From 1c96d10649ab228cd701bd749e72a417ad10f7ad Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Tue, 8 Oct 2024 14:41:56 +0200 Subject: [PATCH 1/7] chore: deploy on flow --- deployments/flow/.chainId | 1 + deployments/flow/Automate.json | 813 +++++++++++++++ deployments/flow/Automate_Implementation.json | 948 ++++++++++++++++++ deployments/flow/Automate_Proxy.json | 218 ++++ deployments/flow/OpsProxy.json | 220 ++++ deployments/flow/OpsProxyFactory.json | 478 +++++++++ .../flow/OpsProxyFactory_Implementation.json | 457 +++++++++ deployments/flow/OpsProxyFactory_Proxy.json | 218 ++++ deployments/flow/ProxyModule.json | 607 +++++++++++ deployments/flow/ResolverModule.json | 613 +++++++++++ deployments/flow/SingleExecModule.json | 580 +++++++++++ deployments/flow/TriggerModule.json | 695 +++++++++++++ deployments/flow/Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 15 files changed, 6726 insertions(+) create mode 100644 deployments/flow/.chainId create mode 100644 deployments/flow/Automate.json create mode 100644 deployments/flow/Automate_Implementation.json create mode 100644 deployments/flow/Automate_Proxy.json create mode 100644 deployments/flow/OpsProxy.json create mode 100644 deployments/flow/OpsProxyFactory.json create mode 100644 deployments/flow/OpsProxyFactory_Implementation.json create mode 100644 deployments/flow/OpsProxyFactory_Proxy.json create mode 100644 deployments/flow/ProxyModule.json create mode 100644 deployments/flow/ResolverModule.json create mode 100644 deployments/flow/SingleExecModule.json create mode 100644 deployments/flow/TriggerModule.json create mode 100644 deployments/flow/Web3FunctionModule.json create mode 100644 deployments/flow/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/flow/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/flow/.chainId b/deployments/flow/.chainId new file mode 100644 index 0000000..8c28da6 --- /dev/null +++ b/deployments/flow/.chainId @@ -0,0 +1 @@ +747 \ No newline at end of file diff --git a/deployments/flow/Automate.json b/deployments/flow/Automate.json new file mode 100644 index 0000000..a185b44 --- /dev/null +++ b/deployments/flow/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0xd1330bb2e9a167b78ead379dcf7c81ab189d4d44aa20ea9ca3a06e291aefa172", + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3496452, + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xd1330bb2e9a167b78ead379dcf7c81ab189d4d44aa20ea9ca3a06e291aefa172" + }, + { + "transactionIndex": 0, + "blockNumber": 3496452, + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xd1330bb2e9a167b78ead379dcf7c81ab189d4d44aa20ea9ca3a06e291aefa172" + } + ], + "blockNumber": 3496452, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/flow/Automate_Implementation.json b/deployments/flow/Automate_Implementation.json new file mode 100644 index 0000000..b2f54f5 --- /dev/null +++ b/deployments/flow/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc5b61369acc8e0472f358c035384271f7d03b28725fa4b12234bb6bd843583b3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe12fee1c712a0ef3d2651b6f1e1fbb7e722d010d275871a73cb2fe58d56a97d4", + "transactionHash": "0xc5b61369acc8e0472f358c035384271f7d03b28725fa4b12234bb6bd843583b3", + "logs": [], + "blockNumber": 3496430, + "cumulativeGasUsed": "4102166", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/Automate_Proxy.json b/deployments/flow/Automate_Proxy.json new file mode 100644 index 0000000..16bf418 --- /dev/null +++ b/deployments/flow/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0xd1330bb2e9a167b78ead379dcf7c81ab189d4d44aa20ea9ca3a06e291aefa172", + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3496452, + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xd1330bb2e9a167b78ead379dcf7c81ab189d4d44aa20ea9ca3a06e291aefa172" + }, + { + "transactionIndex": 0, + "blockNumber": 3496452, + "transactionHash": "0x472edfe37f31aaeb834eb1fd34f479a9b8a86db5f55c0a3d10c6f7fbed1fc7b8", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xd1330bb2e9a167b78ead379dcf7c81ab189d4d44aa20ea9ca3a06e291aefa172" + } + ], + "blockNumber": 3496452, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/flow/OpsProxy.json b/deployments/flow/OpsProxy.json new file mode 100644 index 0000000..a6e8868 --- /dev/null +++ b/deployments/flow/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xcdb2b09905864869b96086711a1f7c20ff03e1b3cf2f42fb82223649dfed02da", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa6c590d410fcb8a0efd2c29060d6c7e00ded6116ac62bc5216ddc51039befc33", + "transactionHash": "0xcdb2b09905864869b96086711a1f7c20ff03e1b3cf2f42fb82223649dfed02da", + "logs": [], + "blockNumber": 3496502, + "cumulativeGasUsed": "1042902", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/flow/OpsProxyFactory.json b/deployments/flow/OpsProxyFactory.json new file mode 100644 index 0000000..0a9a8a8 --- /dev/null +++ b/deployments/flow/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x0a658c7df1e6ae4d039a15638d3f40d60cd8aa0c29d463412ed62556cda84db6", + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3496551, + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0a658c7df1e6ae4d039a15638d3f40d60cd8aa0c29d463412ed62556cda84db6" + }, + { + "transactionIndex": 0, + "blockNumber": 3496551, + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0a658c7df1e6ae4d039a15638d3f40d60cd8aa0c29d463412ed62556cda84db6" + } + ], + "blockNumber": 3496551, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/flow/OpsProxyFactory_Implementation.json b/deployments/flow/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..7824e33 --- /dev/null +++ b/deployments/flow/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xfba54596bd42ceda652c3e0a14f203919fc30a27928091187a634ac781a4b2e0", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdc068610c11d630c94dc3f92247bb2d2c66c2e84c524eaed693460476369ab9f", + "transactionHash": "0xfba54596bd42ceda652c3e0a14f203919fc30a27928091187a634ac781a4b2e0", + "logs": [], + "blockNumber": 3496530, + "cumulativeGasUsed": "2277168", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/OpsProxyFactory_Proxy.json b/deployments/flow/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..9f4732b --- /dev/null +++ b/deployments/flow/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x0a658c7df1e6ae4d039a15638d3f40d60cd8aa0c29d463412ed62556cda84db6", + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3496551, + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0a658c7df1e6ae4d039a15638d3f40d60cd8aa0c29d463412ed62556cda84db6" + }, + { + "transactionIndex": 0, + "blockNumber": 3496551, + "transactionHash": "0xf72cc3b85ebb0cac3223b0430c4067a28f6779f2f192fe9e2152f94fae0e3303", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0a658c7df1e6ae4d039a15638d3f40d60cd8aa0c29d463412ed62556cda84db6" + } + ], + "blockNumber": 3496551, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/flow/ProxyModule.json b/deployments/flow/ProxyModule.json new file mode 100644 index 0000000..93f9ebc --- /dev/null +++ b/deployments/flow/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xd2159de746a2244d31ca77f43dd1bc2e5bc0dc5254a41be1620eae7296279272", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0765a83385ea9e015f2d379b2537f304952ee22b4877da98e6f21d1556735280", + "transactionHash": "0xd2159de746a2244d31ca77f43dd1bc2e5bc0dc5254a41be1620eae7296279272", + "logs": [], + "blockNumber": 3496594, + "cumulativeGasUsed": "1141739", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/ResolverModule.json b/deployments/flow/ResolverModule.json new file mode 100644 index 0000000..2bef469 --- /dev/null +++ b/deployments/flow/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x9a5ea666150762899cc63e4ac50c94278157a8e664e52bd27761a54b668a63d4", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc5f63f83175afd398df93cc8b90311090966cb14cb6b0e655005a85374f7da59", + "transactionHash": "0x9a5ea666150762899cc63e4ac50c94278157a8e664e52bd27761a54b668a63d4", + "logs": [], + "blockNumber": 3496620, + "cumulativeGasUsed": "662008", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/SingleExecModule.json b/deployments/flow/SingleExecModule.json new file mode 100644 index 0000000..0175cb4 --- /dev/null +++ b/deployments/flow/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x09487e9441d4f6acf8538223390d44f24d9ccd39750f590df9399a0f5107a067", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3d2c812058d0175397ad5b89180d3f61dd4b2cd52323ecc4a6fd726904f79aa7", + "transactionHash": "0x09487e9441d4f6acf8538223390d44f24d9ccd39750f590df9399a0f5107a067", + "logs": [], + "blockNumber": 3496647, + "cumulativeGasUsed": "731092", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/TriggerModule.json b/deployments/flow/TriggerModule.json new file mode 100644 index 0000000..23ff6d6 --- /dev/null +++ b/deployments/flow/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2d4beaeb561323ed5c9940efa1c71eabcbfa5e561b96796ecc85ec79aaa1420d", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xcdfb9bd61f6bc52dc17744f5446066e8ed808f02388a7e0cc5fc506f58392b22", + "transactionHash": "0x2d4beaeb561323ed5c9940efa1c71eabcbfa5e561b96796ecc85ec79aaa1420d", + "logs": [], + "blockNumber": 3496676, + "cumulativeGasUsed": "1083056", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/Web3FunctionModule.json b/deployments/flow/Web3FunctionModule.json new file mode 100644 index 0000000..1636b11 --- /dev/null +++ b/deployments/flow/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc3ca441aba43e85733d65baadfc5beb3b361420fdcfeb1e3015d2e6f8bd42564", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3870558025a6cab4ea12fa89cc6d87b3a51bf7100b2649bdf7a69930b7fca8bd", + "transactionHash": "0xc3ca441aba43e85733d65baadfc5beb3b361420fdcfeb1e3015d2e6f8bd42564", + "logs": [], + "blockNumber": 3496707, + "cumulativeGasUsed": "752313", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/flow/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/flow/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/flow/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/flow/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/flow/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/flow/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 1788a16aa14458d5b9fd70e6af64affb46777ce1 Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Tue, 8 Oct 2024 15:20:19 +0200 Subject: [PATCH 2/7] chore: deploy on zircuit --- deployments/zircuit/.chainId | 1 + deployments/zircuit/Automate.json | 813 +++++++++++++++ .../zircuit/Automate_Implementation.json | 948 ++++++++++++++++++ deployments/zircuit/Automate_Proxy.json | 218 ++++ deployments/zircuit/OpsProxy.json | 220 ++++ deployments/zircuit/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ .../zircuit/OpsProxyFactory_Proxy.json | 218 ++++ deployments/zircuit/ProxyModule.json | 607 +++++++++++ deployments/zircuit/ResolverModule.json | 613 +++++++++++ deployments/zircuit/SingleExecModule.json | 580 +++++++++++ deployments/zircuit/TriggerModule.json | 695 +++++++++++++ deployments/zircuit/Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 15 files changed, 6726 insertions(+) create mode 100644 deployments/zircuit/.chainId create mode 100644 deployments/zircuit/Automate.json create mode 100644 deployments/zircuit/Automate_Implementation.json create mode 100644 deployments/zircuit/Automate_Proxy.json create mode 100644 deployments/zircuit/OpsProxy.json create mode 100644 deployments/zircuit/OpsProxyFactory.json create mode 100644 deployments/zircuit/OpsProxyFactory_Implementation.json create mode 100644 deployments/zircuit/OpsProxyFactory_Proxy.json create mode 100644 deployments/zircuit/ProxyModule.json create mode 100644 deployments/zircuit/ResolverModule.json create mode 100644 deployments/zircuit/SingleExecModule.json create mode 100644 deployments/zircuit/TriggerModule.json create mode 100644 deployments/zircuit/Web3FunctionModule.json create mode 100644 deployments/zircuit/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/zircuit/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/zircuit/.chainId b/deployments/zircuit/.chainId new file mode 100644 index 0000000..a9d081a --- /dev/null +++ b/deployments/zircuit/.chainId @@ -0,0 +1 @@ +48900 \ No newline at end of file diff --git a/deployments/zircuit/Automate.json b/deployments/zircuit/Automate.json new file mode 100644 index 0000000..0a11056 --- /dev/null +++ b/deployments/zircuit/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x6a66ea9b9f96c03f0ee735eff4af1960e0056a5c3ef3ca343e482955161e0a96", + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 4228271, + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6a66ea9b9f96c03f0ee735eff4af1960e0056a5c3ef3ca343e482955161e0a96" + }, + { + "transactionIndex": 1, + "blockNumber": 4228271, + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6a66ea9b9f96c03f0ee735eff4af1960e0056a5c3ef3ca343e482955161e0a96" + } + ], + "blockNumber": 4228271, + "cumulativeGasUsed": "669994", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/zircuit/Automate_Implementation.json b/deployments/zircuit/Automate_Implementation.json new file mode 100644 index 0000000..7a8ef17 --- /dev/null +++ b/deployments/zircuit/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe11475a45f89d9213f8653aae5b98874af8241d7162a3375eddcb72fcb978c17", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x94f829349f528ab559747942485b6de81d40f12151de803fee630b3a96275604", + "transactionHash": "0xe11475a45f89d9213f8653aae5b98874af8241d7162a3375eddcb72fcb978c17", + "logs": [], + "blockNumber": 4228265, + "cumulativeGasUsed": "4148276", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/Automate_Proxy.json b/deployments/zircuit/Automate_Proxy.json new file mode 100644 index 0000000..2fc3822 --- /dev/null +++ b/deployments/zircuit/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x6a66ea9b9f96c03f0ee735eff4af1960e0056a5c3ef3ca343e482955161e0a96", + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 4228271, + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6a66ea9b9f96c03f0ee735eff4af1960e0056a5c3ef3ca343e482955161e0a96" + }, + { + "transactionIndex": 1, + "blockNumber": 4228271, + "transactionHash": "0x7dcc198e72dd70d8b4071698bba42ef9e795f2414a8c9ad0021f9d6f01ff5432", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6a66ea9b9f96c03f0ee735eff4af1960e0056a5c3ef3ca343e482955161e0a96" + } + ], + "blockNumber": 4228271, + "cumulativeGasUsed": "669994", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/zircuit/OpsProxy.json b/deployments/zircuit/OpsProxy.json new file mode 100644 index 0000000..a94aa5c --- /dev/null +++ b/deployments/zircuit/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xe742653cca56261287ebfbac972f11cbc42f233c5b6535157ec4ab855a848635", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8e54171626597cd88e34a5534f16cdf0b7d3096f5cf96199313cd42815e6e0e2", + "transactionHash": "0xe742653cca56261287ebfbac972f11cbc42f233c5b6535157ec4ab855a848635", + "logs": [], + "blockNumber": 4228286, + "cumulativeGasUsed": "1097400", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/zircuit/OpsProxyFactory.json b/deployments/zircuit/OpsProxyFactory.json new file mode 100644 index 0000000..4b596ba --- /dev/null +++ b/deployments/zircuit/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0xf65de404865003f429d98d053f925869c8e6d958cefcc1fd32b2d30f0a20bc37", + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 4228301, + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xf65de404865003f429d98d053f925869c8e6d958cefcc1fd32b2d30f0a20bc37" + }, + { + "transactionIndex": 1, + "blockNumber": 4228301, + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xf65de404865003f429d98d053f925869c8e6d958cefcc1fd32b2d30f0a20bc37" + } + ], + "blockNumber": 4228301, + "cumulativeGasUsed": "669994", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/zircuit/OpsProxyFactory_Implementation.json b/deployments/zircuit/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..75ea817 --- /dev/null +++ b/deployments/zircuit/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xb2b59cfc21e4e12e9f5c45878c8e17a352ef2e71ca9528f0fca4780ae525ea30", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5eda786a359503bf355a5d4347de60c149ef12cab8464f33a746c7dafb0340a8", + "transactionHash": "0xb2b59cfc21e4e12e9f5c45878c8e17a352ef2e71ca9528f0fca4780ae525ea30", + "logs": [], + "blockNumber": 4228296, + "cumulativeGasUsed": "2323278", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/OpsProxyFactory_Proxy.json b/deployments/zircuit/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..df59c8c --- /dev/null +++ b/deployments/zircuit/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0xf65de404865003f429d98d053f925869c8e6d958cefcc1fd32b2d30f0a20bc37", + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 4228301, + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xf65de404865003f429d98d053f925869c8e6d958cefcc1fd32b2d30f0a20bc37" + }, + { + "transactionIndex": 1, + "blockNumber": 4228301, + "transactionHash": "0x1ecdbabf87153b31b7e31348e5dd894bd1e38a884b5c92cc59529259ce93e179", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xf65de404865003f429d98d053f925869c8e6d958cefcc1fd32b2d30f0a20bc37" + } + ], + "blockNumber": 4228301, + "cumulativeGasUsed": "669994", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/zircuit/ProxyModule.json b/deployments/zircuit/ProxyModule.json new file mode 100644 index 0000000..ed73153 --- /dev/null +++ b/deployments/zircuit/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0ae0721d8f59faec0b71e42e375369608193374cabcd6d62bbbec8504eda0bb9", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa495879dad126a3e6fcb312fcc6e09bf0f088251586f3f4acf05f5237d05c949", + "transactionHash": "0x0ae0721d8f59faec0b71e42e375369608193374cabcd6d62bbbec8504eda0bb9", + "logs": [], + "blockNumber": 4228314, + "cumulativeGasUsed": "1187849", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/ResolverModule.json b/deployments/zircuit/ResolverModule.json new file mode 100644 index 0000000..e12b46b --- /dev/null +++ b/deployments/zircuit/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xf6c5bcfd363b211b212e85c771af07d98b97ad20b3edda32867bd8e906aafc36", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x85154b0c6b37af556b5cbeba9644ac64f7c7c3727f636df59f467469dd370baa", + "transactionHash": "0xf6c5bcfd363b211b212e85c771af07d98b97ad20b3edda32867bd8e906aafc36", + "logs": [], + "blockNumber": 4228323, + "cumulativeGasUsed": "716506", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/SingleExecModule.json b/deployments/zircuit/SingleExecModule.json new file mode 100644 index 0000000..1e99616 --- /dev/null +++ b/deployments/zircuit/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x765c299c0ddf496aa9ea2ee07e5f2f1b2a76281c3bac24c8f9c5053f2f1eebb3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe0a3066fb23c5da3d0bf99674d8a065c4880d7af35be6102926fdf5d86fb2a78", + "transactionHash": "0x765c299c0ddf496aa9ea2ee07e5f2f1b2a76281c3bac24c8f9c5053f2f1eebb3", + "logs": [], + "blockNumber": 4228331, + "cumulativeGasUsed": "777202", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/TriggerModule.json b/deployments/zircuit/TriggerModule.json new file mode 100644 index 0000000..2e7aabf --- /dev/null +++ b/deployments/zircuit/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0b3e1109fa26d8e238e5296adfe3941376a240515b6357df7306eb0b6226014e", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe3f1242f139f2ede10ca9516e4441f4f747d975ad7adc4470c3f66367a69d3ab", + "transactionHash": "0x0b3e1109fa26d8e238e5296adfe3941376a240515b6357df7306eb0b6226014e", + "logs": [], + "blockNumber": 4228340, + "cumulativeGasUsed": "1137554", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/Web3FunctionModule.json b/deployments/zircuit/Web3FunctionModule.json new file mode 100644 index 0000000..15876f7 --- /dev/null +++ b/deployments/zircuit/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xb628b0a7d157eeb975f5eb05cc1c72687ea9d48b21e97359004dbf935898807e", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x34291ec8d259cc7f1a60e4b2509b40b5715fcf110349a6f6aece7a30c463e27d", + "transactionHash": "0xb628b0a7d157eeb975f5eb05cc1c72687ea9d48b21e97359004dbf935898807e", + "logs": [], + "blockNumber": 4228349, + "cumulativeGasUsed": "798423", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/zircuit/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/zircuit/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/zircuit/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/zircuit/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/zircuit/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 4c5a1f6739d0383c97144d787bbba248f9ba5138 Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Mon, 28 Oct 2024 16:25:03 +0800 Subject: [PATCH 3/7] chore: deploy on carvtestnet --- deployments/carvtestnet/.chainId | 1 + deployments/carvtestnet/Automate.json | 813 +++++++++++++++ .../carvtestnet/Automate_Implementation.json | 948 ++++++++++++++++++ deployments/carvtestnet/Automate_Proxy.json | 218 ++++ deployments/carvtestnet/OpsProxy.json | 220 ++++ deployments/carvtestnet/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ .../carvtestnet/OpsProxyFactory_Proxy.json | 218 ++++ deployments/carvtestnet/ProxyModule.json | 607 +++++++++++ deployments/carvtestnet/ResolverModule.json | 613 +++++++++++ deployments/carvtestnet/SingleExecModule.json | 580 +++++++++++ deployments/carvtestnet/TriggerModule.json | 695 +++++++++++++ .../carvtestnet/Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 15 files changed, 6726 insertions(+) create mode 100644 deployments/carvtestnet/.chainId create mode 100644 deployments/carvtestnet/Automate.json create mode 100644 deployments/carvtestnet/Automate_Implementation.json create mode 100644 deployments/carvtestnet/Automate_Proxy.json create mode 100644 deployments/carvtestnet/OpsProxy.json create mode 100644 deployments/carvtestnet/OpsProxyFactory.json create mode 100644 deployments/carvtestnet/OpsProxyFactory_Implementation.json create mode 100644 deployments/carvtestnet/OpsProxyFactory_Proxy.json create mode 100644 deployments/carvtestnet/ProxyModule.json create mode 100644 deployments/carvtestnet/ResolverModule.json create mode 100644 deployments/carvtestnet/SingleExecModule.json create mode 100644 deployments/carvtestnet/TriggerModule.json create mode 100644 deployments/carvtestnet/Web3FunctionModule.json create mode 100644 deployments/carvtestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/carvtestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/carvtestnet/.chainId b/deployments/carvtestnet/.chainId new file mode 100644 index 0000000..789b854 --- /dev/null +++ b/deployments/carvtestnet/.chainId @@ -0,0 +1 @@ +123420000567 \ No newline at end of file diff --git a/deployments/carvtestnet/Automate.json b/deployments/carvtestnet/Automate.json new file mode 100644 index 0000000..b6ab22b --- /dev/null +++ b/deployments/carvtestnet/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x0209204cf24731798cb56930225da86a969a8a2a91a5b9b916ea227bae31d738", + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 67332, + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0209204cf24731798cb56930225da86a969a8a2a91a5b9b916ea227bae31d738" + }, + { + "transactionIndex": 1, + "blockNumber": 67332, + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0209204cf24731798cb56930225da86a969a8a2a91a5b9b916ea227bae31d738" + } + ], + "blockNumber": 67332, + "cumulativeGasUsed": "667714", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/Automate_Implementation.json b/deployments/carvtestnet/Automate_Implementation.json new file mode 100644 index 0000000..625e133 --- /dev/null +++ b/deployments/carvtestnet/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x5ddf11747c819efb8e9c5b5e2f53cd7b8c06db330c1941acbb55762943dcc6e5", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdce554cc8ac4e5fade4572398d439e5ca27d80d9c1f38267286691f271b17fcb", + "transactionHash": "0x5ddf11747c819efb8e9c5b5e2f53cd7b8c06db330c1941acbb55762943dcc6e5", + "logs": [], + "blockNumber": 67328, + "cumulativeGasUsed": "4145996", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/Automate_Proxy.json b/deployments/carvtestnet/Automate_Proxy.json new file mode 100644 index 0000000..36a2297 --- /dev/null +++ b/deployments/carvtestnet/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x0209204cf24731798cb56930225da86a969a8a2a91a5b9b916ea227bae31d738", + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 67332, + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0209204cf24731798cb56930225da86a969a8a2a91a5b9b916ea227bae31d738" + }, + { + "transactionIndex": 1, + "blockNumber": 67332, + "transactionHash": "0xfa2d538a64bc9f3615ab71313bb660ebf9e80c8d2aba43a209ac6437eeac76dd", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x0209204cf24731798cb56930225da86a969a8a2a91a5b9b916ea227bae31d738" + } + ], + "blockNumber": 67332, + "cumulativeGasUsed": "667714", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/OpsProxy.json b/deployments/carvtestnet/OpsProxy.json new file mode 100644 index 0000000..a042c65 --- /dev/null +++ b/deployments/carvtestnet/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x3360e1fbfddfd7a8a4818a9af0e6c8593fd9432503f27263146c6f7ee9440256", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x48d0d574d7ef758cd7c6d0f217a562606842f32924509fe03f2e8ce80aceab51", + "transactionHash": "0x3360e1fbfddfd7a8a4818a9af0e6c8593fd9432503f27263146c6f7ee9440256", + "logs": [], + "blockNumber": 67343, + "cumulativeGasUsed": "1086732", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/OpsProxyFactory.json b/deployments/carvtestnet/OpsProxyFactory.json new file mode 100644 index 0000000..4f793b0 --- /dev/null +++ b/deployments/carvtestnet/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x756942ad3d6598a9e4460ffad78e3d32a2566dbd18b7f797f5900d87ab924126", + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 67358, + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x756942ad3d6598a9e4460ffad78e3d32a2566dbd18b7f797f5900d87ab924126" + }, + { + "transactionIndex": 1, + "blockNumber": 67358, + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x756942ad3d6598a9e4460ffad78e3d32a2566dbd18b7f797f5900d87ab924126" + } + ], + "blockNumber": 67358, + "cumulativeGasUsed": "676102", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/OpsProxyFactory_Implementation.json b/deployments/carvtestnet/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..52de809 --- /dev/null +++ b/deployments/carvtestnet/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe698def0f2d8be0fe7f192c3be7148923dc5f39d4c926b8e3aaa3653c4515124", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x57177578a0db5a55ab235d157524a9e6d6856edf1c116b5d71e51d39b0fc96ce", + "transactionHash": "0xe698def0f2d8be0fe7f192c3be7148923dc5f39d4c926b8e3aaa3653c4515124", + "logs": [], + "blockNumber": 67350, + "cumulativeGasUsed": "2320998", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/OpsProxyFactory_Proxy.json b/deployments/carvtestnet/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..bbc77cb --- /dev/null +++ b/deployments/carvtestnet/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x756942ad3d6598a9e4460ffad78e3d32a2566dbd18b7f797f5900d87ab924126", + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 67358, + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x756942ad3d6598a9e4460ffad78e3d32a2566dbd18b7f797f5900d87ab924126" + }, + { + "transactionIndex": 1, + "blockNumber": 67358, + "transactionHash": "0x9f40ebbbe07e07444f2d8ffc2759ede06d7fc22036523aaaf180bc47606a0d92", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x756942ad3d6598a9e4460ffad78e3d32a2566dbd18b7f797f5900d87ab924126" + } + ], + "blockNumber": 67358, + "cumulativeGasUsed": "676102", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/ProxyModule.json b/deployments/carvtestnet/ProxyModule.json new file mode 100644 index 0000000..21123db --- /dev/null +++ b/deployments/carvtestnet/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc8f7c989e0f82c26bf21fdf1ba47e7e98f118eba1e215bea2ba40286aab8999f", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7203d6a6d6eeada6446949f0cb14a5531be2483369863c4b58b1b9a39312fb45", + "transactionHash": "0xc8f7c989e0f82c26bf21fdf1ba47e7e98f118eba1e215bea2ba40286aab8999f", + "logs": [], + "blockNumber": 67369, + "cumulativeGasUsed": "1185569", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/ResolverModule.json b/deployments/carvtestnet/ResolverModule.json new file mode 100644 index 0000000..c27433d --- /dev/null +++ b/deployments/carvtestnet/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x3f1587b11e7fa99e77f619f90040aad240a13b95609e8630c14f58ee82e29521", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x16fca04b7414c7d5d7fe58d7c75b7b57078c6cf88c68b428988bf4276890c5e3", + "transactionHash": "0x3f1587b11e7fa99e77f619f90040aad240a13b95609e8630c14f58ee82e29521", + "logs": [], + "blockNumber": 67403, + "cumulativeGasUsed": "705838", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/SingleExecModule.json b/deployments/carvtestnet/SingleExecModule.json new file mode 100644 index 0000000..70f6117 --- /dev/null +++ b/deployments/carvtestnet/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x416843ad271a16eb89fb68fae9f1c7484b42d6837a24b536b4eace83d22f1d30", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xad2abb516116318816fd506ed3fccf62c8023430dc68eac8fc0c6f04f20f342f", + "transactionHash": "0x416843ad271a16eb89fb68fae9f1c7484b42d6837a24b536b4eace83d22f1d30", + "logs": [], + "blockNumber": 67411, + "cumulativeGasUsed": "774922", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/TriggerModule.json b/deployments/carvtestnet/TriggerModule.json new file mode 100644 index 0000000..4faa924 --- /dev/null +++ b/deployments/carvtestnet/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xfc743c08cc2a1908735de0084992be1ae40638f64046d79d02c2925a7ee6d5ac", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa728d56fa5c8d380f02aef5038b98feca8061086a7784ae36a8a6e87b53456a3", + "transactionHash": "0xfc743c08cc2a1908735de0084992be1ae40638f64046d79d02c2925a7ee6d5ac", + "logs": [], + "blockNumber": 67420, + "cumulativeGasUsed": "1126886", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/Web3FunctionModule.json b/deployments/carvtestnet/Web3FunctionModule.json new file mode 100644 index 0000000..28f29cd --- /dev/null +++ b/deployments/carvtestnet/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc454845a0ddc44df7d19b0ecb5ada4e71b61f9da441fee897ac73f867a554b2c", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x22e460bb3da72cd4338f26f68df6f824f6aba3f40cc85a00dc0b42cab0e3ce1c", + "transactionHash": "0xc454845a0ddc44df7d19b0ecb5ada4e71b61f9da441fee897ac73f867a554b2c", + "logs": [], + "blockNumber": 67426, + "cumulativeGasUsed": "796143", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/carvtestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/carvtestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/carvtestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/carvtestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/carvtestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 96b32c16cab04525a44980937a3416a26f790905 Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Thu, 7 Nov 2024 15:17:41 +0800 Subject: [PATCH 4/7] chore: deploy on volmex & inksepolia --- deployments/inksepolia/.chainId | 1 + deployments/inksepolia/Automate.json | 813 +++++++++++++++ .../inksepolia/Automate_Implementation.json | 948 ++++++++++++++++++ deployments/inksepolia/Automate_Proxy.json | 218 ++++ deployments/inksepolia/OpsProxy.json | 220 ++++ deployments/inksepolia/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ .../inksepolia/OpsProxyFactory_Proxy.json | 218 ++++ deployments/inksepolia/ProxyModule.json | 607 +++++++++++ deployments/inksepolia/ResolverModule.json | 613 +++++++++++ deployments/inksepolia/SingleExecModule.json | 580 +++++++++++ deployments/inksepolia/TriggerModule.json | 695 +++++++++++++ .../inksepolia/Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ deployments/volmex/.chainId | 1 + deployments/volmex/Automate.json | 813 +++++++++++++++ .../volmex/Automate_Implementation.json | 948 ++++++++++++++++++ deployments/volmex/Automate_Proxy.json | 218 ++++ deployments/volmex/OpsProxy.json | 220 ++++ deployments/volmex/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ deployments/volmex/OpsProxyFactory_Proxy.json | 218 ++++ deployments/volmex/ProxyModule.json | 607 +++++++++++ deployments/volmex/ResolverModule.json | 613 +++++++++++ deployments/volmex/SingleExecModule.json | 580 +++++++++++ deployments/volmex/TriggerModule.json | 695 +++++++++++++ deployments/volmex/Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 30 files changed, 13452 insertions(+) create mode 100644 deployments/inksepolia/.chainId create mode 100644 deployments/inksepolia/Automate.json create mode 100644 deployments/inksepolia/Automate_Implementation.json create mode 100644 deployments/inksepolia/Automate_Proxy.json create mode 100644 deployments/inksepolia/OpsProxy.json create mode 100644 deployments/inksepolia/OpsProxyFactory.json create mode 100644 deployments/inksepolia/OpsProxyFactory_Implementation.json create mode 100644 deployments/inksepolia/OpsProxyFactory_Proxy.json create mode 100644 deployments/inksepolia/ProxyModule.json create mode 100644 deployments/inksepolia/ResolverModule.json create mode 100644 deployments/inksepolia/SingleExecModule.json create mode 100644 deployments/inksepolia/TriggerModule.json create mode 100644 deployments/inksepolia/Web3FunctionModule.json create mode 100644 deployments/inksepolia/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/inksepolia/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json create mode 100644 deployments/volmex/.chainId create mode 100644 deployments/volmex/Automate.json create mode 100644 deployments/volmex/Automate_Implementation.json create mode 100644 deployments/volmex/Automate_Proxy.json create mode 100644 deployments/volmex/OpsProxy.json create mode 100644 deployments/volmex/OpsProxyFactory.json create mode 100644 deployments/volmex/OpsProxyFactory_Implementation.json create mode 100644 deployments/volmex/OpsProxyFactory_Proxy.json create mode 100644 deployments/volmex/ProxyModule.json create mode 100644 deployments/volmex/ResolverModule.json create mode 100644 deployments/volmex/SingleExecModule.json create mode 100644 deployments/volmex/TriggerModule.json create mode 100644 deployments/volmex/Web3FunctionModule.json create mode 100644 deployments/volmex/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/volmex/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/inksepolia/.chainId b/deployments/inksepolia/.chainId new file mode 100644 index 0000000..37ad609 --- /dev/null +++ b/deployments/inksepolia/.chainId @@ -0,0 +1 @@ +763373 \ No newline at end of file diff --git a/deployments/inksepolia/Automate.json b/deployments/inksepolia/Automate.json new file mode 100644 index 0000000..8cd1e1b --- /dev/null +++ b/deployments/inksepolia/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x6e749f0f5e300844f770cccb18024542413836382cd8dae081b7ee1af63303ed", + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 1105797, + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6e749f0f5e300844f770cccb18024542413836382cd8dae081b7ee1af63303ed" + }, + { + "transactionIndex": 1, + "blockNumber": 1105797, + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6e749f0f5e300844f770cccb18024542413836382cd8dae081b7ee1af63303ed" + } + ], + "blockNumber": 1105797, + "cumulativeGasUsed": "667750", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/inksepolia/Automate_Implementation.json b/deployments/inksepolia/Automate_Implementation.json new file mode 100644 index 0000000..4eaf066 --- /dev/null +++ b/deployments/inksepolia/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x85f3436f6861c0377fee12117a2adf60ca253e358056a0b259018dad7c6aca04", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x35767756cec09d15404eba9cf422a2285c3933f1fe9f6b6299ab0838b3203560", + "transactionHash": "0x85f3436f6861c0377fee12117a2adf60ca253e358056a0b259018dad7c6aca04", + "logs": [], + "blockNumber": 1105788, + "cumulativeGasUsed": "4146032", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/Automate_Proxy.json b/deployments/inksepolia/Automate_Proxy.json new file mode 100644 index 0000000..91b1847 --- /dev/null +++ b/deployments/inksepolia/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x6e749f0f5e300844f770cccb18024542413836382cd8dae081b7ee1af63303ed", + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 1105797, + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x6e749f0f5e300844f770cccb18024542413836382cd8dae081b7ee1af63303ed" + }, + { + "transactionIndex": 1, + "blockNumber": 1105797, + "transactionHash": "0xf03b7e55cf70c94788cdc3556d836d5745a847e131e7d9d451f44a30dd4a90ca", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x6e749f0f5e300844f770cccb18024542413836382cd8dae081b7ee1af63303ed" + } + ], + "blockNumber": 1105797, + "cumulativeGasUsed": "667750", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/inksepolia/OpsProxy.json b/deployments/inksepolia/OpsProxy.json new file mode 100644 index 0000000..9eb2adb --- /dev/null +++ b/deployments/inksepolia/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x8ce3e40488cf0b88555480b1df330e5b3ca4deb076ccbda469c1c3a72904c87e", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xfe924987c6dfa1c2323f31de85430f13c7ac748780450a4825a57b389898f5eb", + "transactionHash": "0x8ce3e40488cf0b88555480b1df330e5b3ca4deb076ccbda469c1c3a72904c87e", + "logs": [], + "blockNumber": 1105816, + "cumulativeGasUsed": "1086768", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/inksepolia/OpsProxyFactory.json b/deployments/inksepolia/OpsProxyFactory.json new file mode 100644 index 0000000..ab4e022 --- /dev/null +++ b/deployments/inksepolia/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x4a981d128ce3a50685aa69e4343960856a98ddc63d225d809ef528238d5d8e8a", + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 1105836, + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x4a981d128ce3a50685aa69e4343960856a98ddc63d225d809ef528238d5d8e8a" + }, + { + "transactionIndex": 1, + "blockNumber": 1105836, + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x4a981d128ce3a50685aa69e4343960856a98ddc63d225d809ef528238d5d8e8a" + } + ], + "blockNumber": 1105836, + "cumulativeGasUsed": "667750", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/inksepolia/OpsProxyFactory_Implementation.json b/deployments/inksepolia/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..a99f15f --- /dev/null +++ b/deployments/inksepolia/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc7eaab0a227b8fcb5445e0381d684874f7c1d5a6e850da854e57b8b27fbac174", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x222a17953e693cc1b02dcef732793d451bfd885f9cca3a87ab66affc0b7c746c", + "transactionHash": "0xc7eaab0a227b8fcb5445e0381d684874f7c1d5a6e850da854e57b8b27fbac174", + "logs": [], + "blockNumber": 1105830, + "cumulativeGasUsed": "2321034", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/OpsProxyFactory_Proxy.json b/deployments/inksepolia/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..d0c0aec --- /dev/null +++ b/deployments/inksepolia/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x4a981d128ce3a50685aa69e4343960856a98ddc63d225d809ef528238d5d8e8a", + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 1105836, + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x4a981d128ce3a50685aa69e4343960856a98ddc63d225d809ef528238d5d8e8a" + }, + { + "transactionIndex": 1, + "blockNumber": 1105836, + "transactionHash": "0x69f08dffe3d60222e8a47c343ea9822fb979196aaecc85f58fccbd5ecd2be3d4", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x4a981d128ce3a50685aa69e4343960856a98ddc63d225d809ef528238d5d8e8a" + } + ], + "blockNumber": 1105836, + "cumulativeGasUsed": "667750", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/inksepolia/ProxyModule.json b/deployments/inksepolia/ProxyModule.json new file mode 100644 index 0000000..49a2c2a --- /dev/null +++ b/deployments/inksepolia/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xbc4813e7043e3a3b2504de25f197143e7fc6048c458be10bdf08508dd6a2a660", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x42cfc183b470b9a29ad6ef064b2fd36736c1ce24cc44849187e45f9e71484181", + "transactionHash": "0xbc4813e7043e3a3b2504de25f197143e7fc6048c458be10bdf08508dd6a2a660", + "logs": [], + "blockNumber": 1105855, + "cumulativeGasUsed": "1185593", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/ResolverModule.json b/deployments/inksepolia/ResolverModule.json new file mode 100644 index 0000000..3b8e5f1 --- /dev/null +++ b/deployments/inksepolia/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x5db941f5b7dd0b0c344da61ee356b24aa82f87fef97c12825eb75b6e06454e39", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3aae9487a20ffaf193c13361864fd33892ce893e68156450d6c9a2f954b331b3", + "transactionHash": "0x5db941f5b7dd0b0c344da61ee356b24aa82f87fef97c12825eb75b6e06454e39", + "logs": [], + "blockNumber": 1105869, + "cumulativeGasUsed": "705874", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/SingleExecModule.json b/deployments/inksepolia/SingleExecModule.json new file mode 100644 index 0000000..a7c7f26 --- /dev/null +++ b/deployments/inksepolia/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe06d254020446c19885c20e2337164c2d3cb18d4cca7f84345c0226e8642ddb1", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa78a91ea6381d168e69da2b42425600697a476e4a0919346c0f951d2703e6d51", + "transactionHash": "0xe06d254020446c19885c20e2337164c2d3cb18d4cca7f84345c0226e8642ddb1", + "logs": [], + "blockNumber": 1105884, + "cumulativeGasUsed": "774958", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/TriggerModule.json b/deployments/inksepolia/TriggerModule.json new file mode 100644 index 0000000..7c6c527 --- /dev/null +++ b/deployments/inksepolia/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe32d97dc5d3b35d02659a0b5625fd8697141740fee2198481efc69b9630c3ff4", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x84aaf03a8df205250ca517142b056fe4ad63a7b07585b7d25e3a7a5687b00584", + "transactionHash": "0xe32d97dc5d3b35d02659a0b5625fd8697141740fee2198481efc69b9630c3ff4", + "logs": [], + "blockNumber": 1105898, + "cumulativeGasUsed": "1126922", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/Web3FunctionModule.json b/deployments/inksepolia/Web3FunctionModule.json new file mode 100644 index 0000000..f45f046 --- /dev/null +++ b/deployments/inksepolia/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7567dd4d90a9f3356ef1c35c336fc05993c599fc2de930ffa541f10d87494a73", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x90da526c77513e0b14d91c0a5759710d58de7f7a6bb79a97deb0f87724fd8dd7", + "transactionHash": "0x7567dd4d90a9f3356ef1c35c336fc05993c599fc2de930ffa541f10d87494a73", + "logs": [], + "blockNumber": 1105912, + "cumulativeGasUsed": "796179", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/inksepolia/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/inksepolia/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/inksepolia/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/inksepolia/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/inksepolia/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/volmex/.chainId b/deployments/volmex/.chainId new file mode 100644 index 0000000..456be07 --- /dev/null +++ b/deployments/volmex/.chainId @@ -0,0 +1 @@ +123420000588 \ No newline at end of file diff --git a/deployments/volmex/Automate.json b/deployments/volmex/Automate.json new file mode 100644 index 0000000..6beb2fc --- /dev/null +++ b/deployments/volmex/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x9de3af069ce248aab200952d733393bba1d9c2df3ca04fefcc70c4346254c669", + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 61084, + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x9de3af069ce248aab200952d733393bba1d9c2df3ca04fefcc70c4346254c669" + }, + { + "transactionIndex": 1, + "blockNumber": 61084, + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x9de3af069ce248aab200952d733393bba1d9c2df3ca04fefcc70c4346254c669" + } + ], + "blockNumber": 61084, + "cumulativeGasUsed": "670490", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/volmex/Automate_Implementation.json b/deployments/volmex/Automate_Implementation.json new file mode 100644 index 0000000..b2e4568 --- /dev/null +++ b/deployments/volmex/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x906b63ef58d62c7a589228d5ff5263611ac3f7dde43803ee3745e79a9aa503d6", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa008b7c0dd3ac4ddb4a904a307adf14ca101683682eff76f0c060c76f4a5438d", + "transactionHash": "0x906b63ef58d62c7a589228d5ff5263611ac3f7dde43803ee3745e79a9aa503d6", + "logs": [], + "blockNumber": 61079, + "cumulativeGasUsed": "4148772", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/Automate_Proxy.json b/deployments/volmex/Automate_Proxy.json new file mode 100644 index 0000000..3755989 --- /dev/null +++ b/deployments/volmex/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x9de3af069ce248aab200952d733393bba1d9c2df3ca04fefcc70c4346254c669", + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 61084, + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x9de3af069ce248aab200952d733393bba1d9c2df3ca04fefcc70c4346254c669" + }, + { + "transactionIndex": 1, + "blockNumber": 61084, + "transactionHash": "0x8c8d5e91ad55bc2625b5c43bad88f748f2eeb2c674517a9e3a1accacb5d97ea3", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x9de3af069ce248aab200952d733393bba1d9c2df3ca04fefcc70c4346254c669" + } + ], + "blockNumber": 61084, + "cumulativeGasUsed": "670490", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/volmex/OpsProxy.json b/deployments/volmex/OpsProxy.json new file mode 100644 index 0000000..3a50b66 --- /dev/null +++ b/deployments/volmex/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x84ed23d94d18d9506b6133b24e4f7eef70ca95d589bcdda249bd58b02dc3a374", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xfa50db424421bdbd3def07f5c08b5dfece19ce2ace391c168688b32fbf895944", + "transactionHash": "0x84ed23d94d18d9506b6133b24e4f7eef70ca95d589bcdda249bd58b02dc3a374", + "logs": [], + "blockNumber": 61096, + "cumulativeGasUsed": "1089508", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/volmex/OpsProxyFactory.json b/deployments/volmex/OpsProxyFactory.json new file mode 100644 index 0000000..ee1411a --- /dev/null +++ b/deployments/volmex/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x5d606d60f1b8a9bba4d5448080fee519591b702b2cb99c3581020e4edc14f9c0", + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 61109, + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x5d606d60f1b8a9bba4d5448080fee519591b702b2cb99c3581020e4edc14f9c0" + }, + { + "transactionIndex": 1, + "blockNumber": 61109, + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x5d606d60f1b8a9bba4d5448080fee519591b702b2cb99c3581020e4edc14f9c0" + } + ], + "blockNumber": 61109, + "cumulativeGasUsed": "673290", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/volmex/OpsProxyFactory_Implementation.json b/deployments/volmex/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..c13723c --- /dev/null +++ b/deployments/volmex/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x511c840f964ccdca4be2193f513af544f5658d3b0dcc717745cf3edb2e657590", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1c6ec690b6e3fc90c4273e4d8eeaf5a12e7e9b2914793f038e13228f20d0230c", + "transactionHash": "0x511c840f964ccdca4be2193f513af544f5658d3b0dcc717745cf3edb2e657590", + "logs": [], + "blockNumber": 61104, + "cumulativeGasUsed": "2323774", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/OpsProxyFactory_Proxy.json b/deployments/volmex/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..9a970f6 --- /dev/null +++ b/deployments/volmex/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x5d606d60f1b8a9bba4d5448080fee519591b702b2cb99c3581020e4edc14f9c0", + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 61109, + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x5d606d60f1b8a9bba4d5448080fee519591b702b2cb99c3581020e4edc14f9c0" + }, + { + "transactionIndex": 1, + "blockNumber": 61109, + "transactionHash": "0x02b2b02dc615ee9a509ba457f5340fcf2dde115cce526b999cb6e15389b76f1c", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x5d606d60f1b8a9bba4d5448080fee519591b702b2cb99c3581020e4edc14f9c0" + } + ], + "blockNumber": 61109, + "cumulativeGasUsed": "673290", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/volmex/ProxyModule.json b/deployments/volmex/ProxyModule.json new file mode 100644 index 0000000..e27a6d6 --- /dev/null +++ b/deployments/volmex/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe80690cf8cc53549f5d95b4c1f7f5e4a6f7aea5d91ba576c05259425a3e2fd49", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x04e781141553465fc7d2847832d26ba1ab514f4887d822f0ab89c9dc8ba46ac7", + "transactionHash": "0xe80690cf8cc53549f5d95b4c1f7f5e4a6f7aea5d91ba576c05259425a3e2fd49", + "logs": [], + "blockNumber": 61119, + "cumulativeGasUsed": "1188345", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/ResolverModule.json b/deployments/volmex/ResolverModule.json new file mode 100644 index 0000000..ea1a2a0 --- /dev/null +++ b/deployments/volmex/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x8356268831bef99659af83dc573cce17fa91ba8a8848d199536b5a6aa4520289", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0b193e82bd335ebe351e0554cacb95f0f8a9010001423499edb05850de1ee461", + "transactionHash": "0x8356268831bef99659af83dc573cce17fa91ba8a8848d199536b5a6aa4520289", + "logs": [], + "blockNumber": 61129, + "cumulativeGasUsed": "708602", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/SingleExecModule.json b/deployments/volmex/SingleExecModule.json new file mode 100644 index 0000000..5fcb6b6 --- /dev/null +++ b/deployments/volmex/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x4182daa977936288c8d8ce34a142fe30a9d1cff0e0c804ca20751389f7fb72f6", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb054df556c8c4e233a5da36ea8ddc8f6d028249d6200ddfef48ad39e207aa8c2", + "transactionHash": "0x4182daa977936288c8d8ce34a142fe30a9d1cff0e0c804ca20751389f7fb72f6", + "logs": [], + "blockNumber": 61137, + "cumulativeGasUsed": "777698", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/TriggerModule.json b/deployments/volmex/TriggerModule.json new file mode 100644 index 0000000..82cefce --- /dev/null +++ b/deployments/volmex/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xcefab498a047f634dbe79d4d8ee7270ef4e7407591c780e9363dde3336b9c408", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb306e56f94febca25350743d562c568d5108bad590fbabbd9bee835e4d9c6a65", + "transactionHash": "0xcefab498a047f634dbe79d4d8ee7270ef4e7407591c780e9363dde3336b9c408", + "logs": [], + "blockNumber": 61143, + "cumulativeGasUsed": "1129662", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/Web3FunctionModule.json b/deployments/volmex/Web3FunctionModule.json new file mode 100644 index 0000000..ff63eca --- /dev/null +++ b/deployments/volmex/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x80415fa5f7f43f52336401ec5fd7967eb5dd511030f487c651776eb49c2463c9", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9d9b3172c7c86588c86b22fdbf95b41546b91bcb04cb54d9b200f31633b25fe3", + "transactionHash": "0x80415fa5f7f43f52336401ec5fd7967eb5dd511030f487c651776eb49c2463c9", + "logs": [], + "blockNumber": 61153, + "cumulativeGasUsed": "798919", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/volmex/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/volmex/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/volmex/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/volmex/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/volmex/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/volmex/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 4aeaa059fa495feec4631d54fdb629560b54a83f Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Thu, 14 Nov 2024 00:15:00 +0800 Subject: [PATCH 5/7] chore: deploy on storyodysseytestnet --- deployments/storyodysseytestnet/.chainId | 1 + deployments/storyodysseytestnet/Automate.json | 813 +++++++++++++++ .../Automate_Implementation.json | 932 ++++++++++++++++++ .../storyodysseytestnet/Automate_Proxy.json | 218 ++++ deployments/storyodysseytestnet/OpsProxy.json | 220 +++++ .../storyodysseytestnet/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ .../OpsProxyFactory_Proxy.json | 218 ++++ .../storyodysseytestnet/ProxyModule.json | 607 ++++++++++++ .../storyodysseytestnet/ResolverModule.json | 613 ++++++++++++ .../storyodysseytestnet/SingleExecModule.json | 580 +++++++++++ .../storyodysseytestnet/TriggerModule.json | 695 +++++++++++++ .../Web3FunctionModule.json | 613 ++++++++++++ .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 14 files changed, 6669 insertions(+) create mode 100644 deployments/storyodysseytestnet/.chainId create mode 100644 deployments/storyodysseytestnet/Automate.json create mode 100644 deployments/storyodysseytestnet/Automate_Implementation.json create mode 100644 deployments/storyodysseytestnet/Automate_Proxy.json create mode 100644 deployments/storyodysseytestnet/OpsProxy.json create mode 100644 deployments/storyodysseytestnet/OpsProxyFactory.json create mode 100644 deployments/storyodysseytestnet/OpsProxyFactory_Implementation.json create mode 100644 deployments/storyodysseytestnet/OpsProxyFactory_Proxy.json create mode 100644 deployments/storyodysseytestnet/ProxyModule.json create mode 100644 deployments/storyodysseytestnet/ResolverModule.json create mode 100644 deployments/storyodysseytestnet/SingleExecModule.json create mode 100644 deployments/storyodysseytestnet/TriggerModule.json create mode 100644 deployments/storyodysseytestnet/Web3FunctionModule.json create mode 100644 deployments/storyodysseytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/storyodysseytestnet/.chainId b/deployments/storyodysseytestnet/.chainId new file mode 100644 index 0000000..f083bc3 --- /dev/null +++ b/deployments/storyodysseytestnet/.chainId @@ -0,0 +1 @@ +1516 \ No newline at end of file diff --git a/deployments/storyodysseytestnet/Automate.json b/deployments/storyodysseytestnet/Automate.json new file mode 100644 index 0000000..bd40867 --- /dev/null +++ b/deployments/storyodysseytestnet/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 42, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x23c1ebdcdb0b17b857b9f68b4e501ad82b473d9c136a33b649e500667f887c2b", + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "logs": [ + { + "transactionIndex": 42, + "blockNumber": 371816, + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 44, + "blockHash": "0x23c1ebdcdb0b17b857b9f68b4e501ad82b473d9c136a33b649e500667f887c2b" + }, + { + "transactionIndex": 42, + "blockNumber": 371816, + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 45, + "blockHash": "0x23c1ebdcdb0b17b857b9f68b4e501ad82b473d9c136a33b649e500667f887c2b" + } + ], + "blockNumber": 371816, + "cumulativeGasUsed": "2988573", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/storyodysseytestnet/Automate_Implementation.json b/deployments/storyodysseytestnet/Automate_Implementation.json new file mode 100644 index 0000000..ed197e5 --- /dev/null +++ b/deployments/storyodysseytestnet/Automate_Implementation.json @@ -0,0 +1,932 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/Automate_Proxy.json b/deployments/storyodysseytestnet/Automate_Proxy.json new file mode 100644 index 0000000..58ae314 --- /dev/null +++ b/deployments/storyodysseytestnet/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 42, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x23c1ebdcdb0b17b857b9f68b4e501ad82b473d9c136a33b649e500667f887c2b", + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "logs": [ + { + "transactionIndex": 42, + "blockNumber": 371816, + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 44, + "blockHash": "0x23c1ebdcdb0b17b857b9f68b4e501ad82b473d9c136a33b649e500667f887c2b" + }, + { + "transactionIndex": 42, + "blockNumber": 371816, + "transactionHash": "0x2e41867b5eb17f2ee26e7bfc6e781f7dff3bb3ae449dc52d9c8c11b44065e4b6", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 45, + "blockHash": "0x23c1ebdcdb0b17b857b9f68b4e501ad82b473d9c136a33b649e500667f887c2b" + } + ], + "blockNumber": 371816, + "cumulativeGasUsed": "2988573", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/storyodysseytestnet/OpsProxy.json b/deployments/storyodysseytestnet/OpsProxy.json new file mode 100644 index 0000000..6e6ac8e --- /dev/null +++ b/deployments/storyodysseytestnet/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xa2a6a91a0b9aa44ece235ecbf3a734464ecf2b86abf734a5f5924abcacf1b6fa", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 29, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0801cb6ce1b01e618f811eb55dc2564716d4ef2d0f1bb46d16daba7152aac111", + "transactionHash": "0xa2a6a91a0b9aa44ece235ecbf3a734464ecf2b86abf734a5f5924abcacf1b6fa", + "logs": [], + "blockNumber": 803587, + "cumulativeGasUsed": "2386449", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/OpsProxyFactory.json b/deployments/storyodysseytestnet/OpsProxyFactory.json new file mode 100644 index 0000000..dff92bf --- /dev/null +++ b/deployments/storyodysseytestnet/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 44, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x158e3e6f86ca393bf2b8fecc7cb7c4989c4655d0a33d0ecb19ba5783f076cb12", + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "logs": [ + { + "transactionIndex": 44, + "blockNumber": 803596, + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 73, + "blockHash": "0x158e3e6f86ca393bf2b8fecc7cb7c4989c4655d0a33d0ecb19ba5783f076cb12" + }, + { + "transactionIndex": 44, + "blockNumber": 803596, + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 74, + "blockHash": "0x158e3e6f86ca393bf2b8fecc7cb7c4989c4655d0a33d0ecb19ba5783f076cb12" + } + ], + "blockNumber": 803596, + "cumulativeGasUsed": "3279367", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/OpsProxyFactory_Implementation.json b/deployments/storyodysseytestnet/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..8c36389 --- /dev/null +++ b/deployments/storyodysseytestnet/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc31d833112100f18f726b511923bb7066d2ac54ef98e3b333e1217fff07002fc", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 41, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x28744ca0cd43877d059da51a50db5a2b98dcd08e6d800de8f05dc16dd613ca0e", + "transactionHash": "0xc31d833112100f18f726b511923bb7066d2ac54ef98e3b333e1217fff07002fc", + "logs": [], + "blockNumber": 803593, + "cumulativeGasUsed": "4729502", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/OpsProxyFactory_Proxy.json b/deployments/storyodysseytestnet/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..279fa95 --- /dev/null +++ b/deployments/storyodysseytestnet/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 44, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x158e3e6f86ca393bf2b8fecc7cb7c4989c4655d0a33d0ecb19ba5783f076cb12", + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "logs": [ + { + "transactionIndex": 44, + "blockNumber": 803596, + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 73, + "blockHash": "0x158e3e6f86ca393bf2b8fecc7cb7c4989c4655d0a33d0ecb19ba5783f076cb12" + }, + { + "transactionIndex": 44, + "blockNumber": 803596, + "transactionHash": "0x4a7d6e23f558788e31220055f8c65510e42dc88a74826cb4c22bb4286786cdf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 74, + "blockHash": "0x158e3e6f86ca393bf2b8fecc7cb7c4989c4655d0a33d0ecb19ba5783f076cb12" + } + ], + "blockNumber": 803596, + "cumulativeGasUsed": "3279367", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/ProxyModule.json b/deployments/storyodysseytestnet/ProxyModule.json new file mode 100644 index 0000000..bf71212 --- /dev/null +++ b/deployments/storyodysseytestnet/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc63830f3686b292582bf7a5c6ace3f7582a64ba44d7fefd67590908687e98bcf", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 23, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdfe84e34475d4a7d3b9faa7ac6b2f58f3bd41e472cb9fa7f2e1784edcf3800e2", + "transactionHash": "0xc63830f3686b292582bf7a5c6ace3f7582a64ba44d7fefd67590908687e98bcf", + "logs": [], + "blockNumber": 803605, + "cumulativeGasUsed": "2146460", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/ResolverModule.json b/deployments/storyodysseytestnet/ResolverModule.json new file mode 100644 index 0000000..354aa29 --- /dev/null +++ b/deployments/storyodysseytestnet/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x5df99fed4ff81fddea694d269ff2d376e4d406736952c558489984580e0e3ad9", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd2498d67f331aea1b8de536fcdb06bd2c58eb048b2ba45361adbd4ec3aefd2ed", + "transactionHash": "0x5df99fed4ff81fddea694d269ff2d376e4d406736952c558489984580e0e3ad9", + "logs": [], + "blockNumber": 374198, + "cumulativeGasUsed": "662008", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/SingleExecModule.json b/deployments/storyodysseytestnet/SingleExecModule.json new file mode 100644 index 0000000..9d09e55 --- /dev/null +++ b/deployments/storyodysseytestnet/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x4c8eb493cfead3e3485376f09036726fe6fa73f3a4341ad820caae90b431b49e", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa4e72c2494859641ee2f4d8b0ccfc5b028ba2e1e3b5d76b5ee7323b0f9c14146", + "transactionHash": "0x4c8eb493cfead3e3485376f09036726fe6fa73f3a4341ad820caae90b431b49e", + "logs": [], + "blockNumber": 374203, + "cumulativeGasUsed": "731092", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/TriggerModule.json b/deployments/storyodysseytestnet/TriggerModule.json new file mode 100644 index 0000000..37d292e --- /dev/null +++ b/deployments/storyodysseytestnet/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xa194cde5cdeadce58d6c687c4f9b8d63a78f7ad1ebfd8c9e756d78f057cdfab3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf5e288bef65d278bd0203158cd1149bdf21e07a2dae66ae8b8676ff60369e501", + "transactionHash": "0xa194cde5cdeadce58d6c687c4f9b8d63a78f7ad1ebfd8c9e756d78f057cdfab3", + "logs": [], + "blockNumber": 374209, + "cumulativeGasUsed": "1083056", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/Web3FunctionModule.json b/deployments/storyodysseytestnet/Web3FunctionModule.json new file mode 100644 index 0000000..f293e3f --- /dev/null +++ b/deployments/storyodysseytestnet/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x8179b79e57f08fb8e30df2e4d5daff486710ad9afa474e99462033e097487e8e", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x14b9a05dc5322b7950980af02d9f0c49639c84842285f4f02d224ac011a74414", + "transactionHash": "0x8179b79e57f08fb8e30df2e4d5daff486710ad9afa474e99462033e097487e8e", + "logs": [], + "blockNumber": 374213, + "cumulativeGasUsed": "752313", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/storyodysseytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/storyodysseytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/storyodysseytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 56f307892c2b0f18518375bb29d32ba09acc2fd4 Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Wed, 18 Dec 2024 11:37:44 +0800 Subject: [PATCH 6/7] chore: deploy on singularitytestnet --- deployments/singularitytestnet/.chainId | 1 + deployments/singularitytestnet/Automate.json | 813 +++++++++++++++ .../Automate_Implementation.json | 948 ++++++++++++++++++ .../singularitytestnet/Automate_Proxy.json | 218 ++++ deployments/singularitytestnet/OpsProxy.json | 220 ++++ .../singularitytestnet/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ .../OpsProxyFactory_Proxy.json | 218 ++++ .../singularitytestnet/ProxyModule.json | 607 +++++++++++ .../singularitytestnet/ResolverModule.json | 613 +++++++++++ .../singularitytestnet/SingleExecModule.json | 580 +++++++++++ .../singularitytestnet/TriggerModule.json | 695 +++++++++++++ .../Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 15 files changed, 6726 insertions(+) create mode 100644 deployments/singularitytestnet/.chainId create mode 100644 deployments/singularitytestnet/Automate.json create mode 100644 deployments/singularitytestnet/Automate_Implementation.json create mode 100644 deployments/singularitytestnet/Automate_Proxy.json create mode 100644 deployments/singularitytestnet/OpsProxy.json create mode 100644 deployments/singularitytestnet/OpsProxyFactory.json create mode 100644 deployments/singularitytestnet/OpsProxyFactory_Implementation.json create mode 100644 deployments/singularitytestnet/OpsProxyFactory_Proxy.json create mode 100644 deployments/singularitytestnet/ProxyModule.json create mode 100644 deployments/singularitytestnet/ResolverModule.json create mode 100644 deployments/singularitytestnet/SingleExecModule.json create mode 100644 deployments/singularitytestnet/TriggerModule.json create mode 100644 deployments/singularitytestnet/Web3FunctionModule.json create mode 100644 deployments/singularitytestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/singularitytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/singularitytestnet/.chainId b/deployments/singularitytestnet/.chainId new file mode 100644 index 0000000..deadc0f --- /dev/null +++ b/deployments/singularitytestnet/.chainId @@ -0,0 +1 @@ +751 \ No newline at end of file diff --git a/deployments/singularitytestnet/Automate.json b/deployments/singularitytestnet/Automate.json new file mode 100644 index 0000000..eac2961 --- /dev/null +++ b/deployments/singularitytestnet/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x818557f88592f7ee8b994c80c9d7c02ee35f7bda5de8f225853d4b6529d52a74", + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 201008, + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x818557f88592f7ee8b994c80c9d7c02ee35f7bda5de8f225853d4b6529d52a74" + }, + { + "transactionIndex": 1, + "blockNumber": 201008, + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x818557f88592f7ee8b994c80c9d7c02ee35f7bda5de8f225853d4b6529d52a74" + } + ], + "blockNumber": 201008, + "cumulativeGasUsed": "676114", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/Automate_Implementation.json b/deployments/singularitytestnet/Automate_Implementation.json new file mode 100644 index 0000000..d70bccb --- /dev/null +++ b/deployments/singularitytestnet/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x78f341b1fc47955c1d8590d84f38dd4fb4d394360f2f3ef9dcb268064813dd12", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x093e54bc2bc93e4e6c12a37dbc563388e9196efadddadea6458950c5e38a1943", + "transactionHash": "0x78f341b1fc47955c1d8590d84f38dd4fb4d394360f2f3ef9dcb268064813dd12", + "logs": [], + "blockNumber": 201004, + "cumulativeGasUsed": "4146008", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/Automate_Proxy.json b/deployments/singularitytestnet/Automate_Proxy.json new file mode 100644 index 0000000..ca76eda --- /dev/null +++ b/deployments/singularitytestnet/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x818557f88592f7ee8b994c80c9d7c02ee35f7bda5de8f225853d4b6529d52a74", + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 201008, + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x818557f88592f7ee8b994c80c9d7c02ee35f7bda5de8f225853d4b6529d52a74" + }, + { + "transactionIndex": 1, + "blockNumber": 201008, + "transactionHash": "0xb9e8caf3e4bc295d9542a3e0875d972775d49a168bbfccc09ba9688cbc259d10", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x818557f88592f7ee8b994c80c9d7c02ee35f7bda5de8f225853d4b6529d52a74" + } + ], + "blockNumber": 201008, + "cumulativeGasUsed": "676114", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/OpsProxy.json b/deployments/singularitytestnet/OpsProxy.json new file mode 100644 index 0000000..9cd74f7 --- /dev/null +++ b/deployments/singularitytestnet/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x029cd257d1f1e0dbc627f2d98de211e5a8c6c14b4eca84c83290a74ddc31953a", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0e100d4ca38d693e56cc0eba55d8c78a0c68c0531dbdb57cfa2779d3d030a813", + "transactionHash": "0x029cd257d1f1e0dbc627f2d98de211e5a8c6c14b4eca84c83290a74ddc31953a", + "logs": [], + "blockNumber": 201019, + "cumulativeGasUsed": "1086744", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/OpsProxyFactory.json b/deployments/singularitytestnet/OpsProxyFactory.json new file mode 100644 index 0000000..1cbe4d8 --- /dev/null +++ b/deployments/singularitytestnet/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x566739a828228c37e7f3a4884790ec07109cf8dbd82bbce8dfd41c8230bea6fd", + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 201033, + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x566739a828228c37e7f3a4884790ec07109cf8dbd82bbce8dfd41c8230bea6fd" + }, + { + "transactionIndex": 1, + "blockNumber": 201033, + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x566739a828228c37e7f3a4884790ec07109cf8dbd82bbce8dfd41c8230bea6fd" + } + ], + "blockNumber": 201033, + "cumulativeGasUsed": "667726", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/OpsProxyFactory_Implementation.json b/deployments/singularitytestnet/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..eea1342 --- /dev/null +++ b/deployments/singularitytestnet/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe1ed40a7301600079428dcf0f60e51c12155dffe6408be7d91b191b09a018bf3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3f733681d335bad420f5659b56db3d0f38f60601dfdce2e9d7bf450170735100", + "transactionHash": "0xe1ed40a7301600079428dcf0f60e51c12155dffe6408be7d91b191b09a018bf3", + "logs": [], + "blockNumber": 201029, + "cumulativeGasUsed": "2320998", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/OpsProxyFactory_Proxy.json b/deployments/singularitytestnet/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..a378d71 --- /dev/null +++ b/deployments/singularitytestnet/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x566739a828228c37e7f3a4884790ec07109cf8dbd82bbce8dfd41c8230bea6fd", + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 201033, + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x566739a828228c37e7f3a4884790ec07109cf8dbd82bbce8dfd41c8230bea6fd" + }, + { + "transactionIndex": 1, + "blockNumber": 201033, + "transactionHash": "0x7b2a8f37752d56a45209ea24ca767167eb8413b81a603f38753b30c74e8d0cf1", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x566739a828228c37e7f3a4884790ec07109cf8dbd82bbce8dfd41c8230bea6fd" + } + ], + "blockNumber": 201033, + "cumulativeGasUsed": "667726", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/ProxyModule.json b/deployments/singularitytestnet/ProxyModule.json new file mode 100644 index 0000000..dce54c9 --- /dev/null +++ b/deployments/singularitytestnet/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x525109303ef834e884d5a7486cc0da955b3c0c38eba50a7571c01386e2800d92", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x13c059dab706aec22d9b7ade6850c46eca69137b6455b03385ef0ff145627c72", + "transactionHash": "0x525109303ef834e884d5a7486cc0da955b3c0c38eba50a7571c01386e2800d92", + "logs": [], + "blockNumber": 201046, + "cumulativeGasUsed": "1306930", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/ResolverModule.json b/deployments/singularitytestnet/ResolverModule.json new file mode 100644 index 0000000..3c0cc60 --- /dev/null +++ b/deployments/singularitytestnet/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x183170b648690513d2df72250affa31a323a4135f6add50d527c92a2091570cc", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x97bed6051a799cc3c38218028015d2babc118ba5a60358dce04e04e32581244a", + "transactionHash": "0x183170b648690513d2df72250affa31a323a4135f6add50d527c92a2091570cc", + "logs": [], + "blockNumber": 201052, + "cumulativeGasUsed": "705838", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/SingleExecModule.json b/deployments/singularitytestnet/SingleExecModule.json new file mode 100644 index 0000000..ec38ebf --- /dev/null +++ b/deployments/singularitytestnet/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x79f1a73cbc9ec72ffb00b082a28d6919cdd0be6213f6111f8b24905adb3c8b39", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe4e9574c21fee0051e2ed4be445d51138ce11f3c5f92412585cbafb68bf7c874", + "transactionHash": "0x79f1a73cbc9ec72ffb00b082a28d6919cdd0be6213f6111f8b24905adb3c8b39", + "logs": [], + "blockNumber": 201058, + "cumulativeGasUsed": "774934", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/TriggerModule.json b/deployments/singularitytestnet/TriggerModule.json new file mode 100644 index 0000000..ca5b944 --- /dev/null +++ b/deployments/singularitytestnet/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xd06a5fdf8f29d6c771babfca10192b44751633ad4cadc4f17b9276a4e4b6215e", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc41e06837cc3d0c8f6a4cab3d87ab62e2fce06b0c0121a444e4971c877d1b1f1", + "transactionHash": "0xd06a5fdf8f29d6c771babfca10192b44751633ad4cadc4f17b9276a4e4b6215e", + "logs": [], + "blockNumber": 201065, + "cumulativeGasUsed": "1126898", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/Web3FunctionModule.json b/deployments/singularitytestnet/Web3FunctionModule.json new file mode 100644 index 0000000..ab98262 --- /dev/null +++ b/deployments/singularitytestnet/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x4e75a01289073ee118e9d46fff12e914adbc7f606dff27a82c0ad2743ff40b63", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc1ad0d6801db35ff619527ba4e938c378e21464f2221ec0811c5a78fda9caba6", + "transactionHash": "0x4e75a01289073ee118e9d46fff12e914adbc7f606dff27a82c0ad2743ff40b63", + "logs": [], + "blockNumber": 201071, + "cumulativeGasUsed": "796155", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/singularitytestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/singularitytestnet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/singularitytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/singularitytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/singularitytestnet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From b4d6f0c7bf2f1fcaedf9cc42a30fa37718434af1 Mon Sep 17 00:00:00 2001 From: Brandon Chuah Date: Wed, 18 Dec 2024 13:47:14 +0800 Subject: [PATCH 7/7] chore: deploy on corn --- deployments/cornmaizenet/.chainId | 1 + deployments/cornmaizenet/Automate.json | 813 +++++++++++++++ .../cornmaizenet/Automate_Implementation.json | 948 ++++++++++++++++++ deployments/cornmaizenet/Automate_Proxy.json | 218 ++++ deployments/cornmaizenet/OpsProxy.json | 220 ++++ deployments/cornmaizenet/OpsProxyFactory.json | 478 +++++++++ .../OpsProxyFactory_Implementation.json | 457 +++++++++ .../cornmaizenet/OpsProxyFactory_Proxy.json | 218 ++++ deployments/cornmaizenet/ProxyModule.json | 607 +++++++++++ deployments/cornmaizenet/ResolverModule.json | 613 +++++++++++ .../cornmaizenet/SingleExecModule.json | 580 +++++++++++ deployments/cornmaizenet/TriggerModule.json | 695 +++++++++++++ .../cornmaizenet/Web3FunctionModule.json | 613 +++++++++++ .../4a46ee6c1a29be400c9fab1ecc28e172.json | 41 + .../5ec0b75b82308a43c369e536d3b31fb6.json | 224 +++++ 15 files changed, 6726 insertions(+) create mode 100644 deployments/cornmaizenet/.chainId create mode 100644 deployments/cornmaizenet/Automate.json create mode 100644 deployments/cornmaizenet/Automate_Implementation.json create mode 100644 deployments/cornmaizenet/Automate_Proxy.json create mode 100644 deployments/cornmaizenet/OpsProxy.json create mode 100644 deployments/cornmaizenet/OpsProxyFactory.json create mode 100644 deployments/cornmaizenet/OpsProxyFactory_Implementation.json create mode 100644 deployments/cornmaizenet/OpsProxyFactory_Proxy.json create mode 100644 deployments/cornmaizenet/ProxyModule.json create mode 100644 deployments/cornmaizenet/ResolverModule.json create mode 100644 deployments/cornmaizenet/SingleExecModule.json create mode 100644 deployments/cornmaizenet/TriggerModule.json create mode 100644 deployments/cornmaizenet/Web3FunctionModule.json create mode 100644 deployments/cornmaizenet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json create mode 100644 deployments/cornmaizenet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json diff --git a/deployments/cornmaizenet/.chainId b/deployments/cornmaizenet/.chainId new file mode 100644 index 0000000..6fe3232 --- /dev/null +++ b/deployments/cornmaizenet/.chainId @@ -0,0 +1 @@ +21000000 \ No newline at end of file diff --git a/deployments/cornmaizenet/Automate.json b/deployments/cornmaizenet/Automate.json new file mode 100644 index 0000000..ae5dbc2 --- /dev/null +++ b/deployments/cornmaizenet/Automate.json @@ -0,0 +1,813 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x8d45dfd38d03faf62675e308f4324ba8fddcb1d429c53e6f5691d3fd101e3fe6", + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 60996, + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x8d45dfd38d03faf62675e308f4324ba8fddcb1d429c53e6f5691d3fd101e3fe6" + }, + { + "transactionIndex": 1, + "blockNumber": 60996, + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x8d45dfd38d03faf62675e308f4324ba8fddcb1d429c53e6f5691d3fd101e3fe6" + } + ], + "blockNumber": 60996, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/Automate_Implementation.json b/deployments/cornmaizenet/Automate_Implementation.json new file mode 100644 index 0000000..bf4af13 --- /dev/null +++ b/deployments/cornmaizenet/Automate_Implementation.json @@ -0,0 +1,948 @@ +{ + "address": "0xab2c44495F5F954149b94C750ca20B64ea60B51c", + "abi": [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_gelato", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "name": "LogUseGelato1Balance", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execDataOrSelector", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + } + ], + "name": "createTask", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "_moduleData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "oneBalanceChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateNumerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nativeToFeeTokenXRateDenominator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "correlationId", + "type": "bytes32" + } + ], + "internalType": "struct IGelato1Balance.Gelato1BalanceParam", + "name": "_oneBalanceParam", + "type": "tuple" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + } + ], + "name": "exec1Balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_correlationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_txFee", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_feeToken", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "_revertOnFailure", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_singleExec", + "type": "bool" + } + ], + "name": "execBypassModuleSyncFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelato", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFeeDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "execSelector", + "type": "bytes4" + }, + { + "components": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "modules", + "type": "uint8[]" + }, + { + "internalType": "bytes[]", + "name": "args", + "type": "bytes[]" + } + ], + "internalType": "struct LibDataTypes.ModuleData", + "name": "moduleData", + "type": "tuple" + }, + { + "internalType": "address", + "name": "feeToken", + "type": "address" + } + ], + "name": "getTaskId", + "outputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "getTaskIdsByUser", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module[]", + "name": "_modules", + "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "_moduleAddresses", + "type": "address[]" + } + ], + "name": "setModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc51301a6bb28ba55d22ef71762bb895e03e5934ff2cb2c05719ec4b4a4669ead", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4102166", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa8376c7931e4e4a3846e6fc0050a18f85604b106a3c15e2d5714713a1be3e356", + "transactionHash": "0xc51301a6bb28ba55d22ef71762bb895e03e5934ff2cb2c05719ec4b4a4669ead", + "logs": [], + "blockNumber": 60995, + "cumulativeGasUsed": "4102166", + "status": 1, + "byzantium": true + }, + "args": [ + "0xd56096b5A70bA6755834f320200811Ec304f3101" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"name\":\"LogUseGelato1Balance\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execDataOrSelector\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"}],\"name\":\"createTask\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"_moduleData\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sponsor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oneBalanceChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateNumerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nativeToFeeTokenXRateDenominator\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"correlationId\",\"type\":\"bytes32\"}],\"internalType\":\"struct IGelato1Balance.Gelato1BalanceParam\",\"name\":\"_oneBalanceParam\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"}],\"name\":\"exec1Balance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_correlationId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_txFee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_feeToken\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"_revertOnFailure\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_singleExec\",\"type\":\"bool\"}],\"name\":\"execBypassModuleSyncFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelato\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"execSelector\",\"type\":\"bytes4\"},{\"components\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"modules\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"args\",\"type\":\"bytes[]\"}],\"internalType\":\"struct LibDataTypes.ModuleData\",\"name\":\"moduleData\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"getTaskId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"getTaskIdsByUser\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module[]\",\"name\":\"_modules\",\"type\":\"uint8[]\"},{\"internalType\":\"address[]\",\"name\":\"_moduleAddresses\",\"type\":\"address[]\"}],\"name\":\"setModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"cancelTask(bytes32)\":{\"params\":{\"taskId\":\"Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\"}},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\"},\"returns\":{\"taskId\":\"Unique hash of the task created.\"}},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"feeToken\":\"Token used to pay for the execution. ETH = 0xeeeeee...\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\",\"txFee\":\"Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\"}},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"params\":{\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"oneBalanceParam\":\"Parameters required for fee payment with Gelato 1Balance.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"taskCreator\":\"The address which created the task.\"}},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"params\":{\"correlationId\":\"Id of the execution to be used for 1Balance settlement.\",\"execAddress\":\"Address of contract that should be called by Gelato.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"revertOnFailure\":\"To revert or not if call to execAddress fails. (Used for off-chain simulations)\",\"singleExec\":\"If the task is a SingleExec task. If true, task will be cancelled after execution.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task.\"}},\"getFeeDetails()\":{\"returns\":{\"_0\":\"uint256 Fee amount to be paid.\",\"_1\":\"address Token to be paid. (Determined and passed by taskCreator during createTask)\"}},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"params\":{\"execAddress\":\"Address of contract that will be called by Gelato.\",\"execSelector\":\"Signature of the function which will be called by Gelato.\",\"feeToken\":\"Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\",\"moduleData\":\"Conditional modules that will be used. {See LibDataTypes-ModuleData}\",\"taskCreator\":\"The address which created the task.\"}},\"getTaskIdsByUser(address)\":{\"params\":{\"taskCreator\":\"Address of task creator to query.\"},\"returns\":{\"_0\":\"bytes32[] List of taskIds created.\"}},\"setModule(uint8[],address[])\":{\"params\":{\"moduleAddresses\":\"List of addresses for respective modules.\",\"modules\":\"List of modules to be set\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelTask(bytes32)\":{\"notice\":\"Terminates a task that was created and Gelato can no longer execute it.\"},\"createTask(address,bytes,(uint8[],bytes[]),address)\":{\"notice\":\"Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\"},\"exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)\":{\"notice\":\"Execution API called by Gelato, using Sync Fee as fee payment method\"},\"exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)\":{\"notice\":\"Execution API called by Gelato, using Gelato 1Balance as fee payment method.\"},\"getFeeDetails()\":{\"notice\":\"Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\"},\"getTaskId(address,address,bytes4,(uint8[],bytes[]),address)\":{\"notice\":\"Helper function to compute task id with module arguments\"},\"getTaskIdsByUser(address)\":{\"notice\":\"Helper func to query all open tasks by a task creator.\"},\"setModule(uint8[],address[])\":{\"notice\":\"Sets the address of task modules. Only callable by proxy admin.\"}},\"notice\":\"Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Automate.sol\":\"Automate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/Automate.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {Gelatofied} from \\\"./vendor/gelato/Gelatofied.sol\\\";\\nimport {GelatoBytes} from \\\"./vendor/gelato/GelatoBytes.sol\\\";\\nimport {Proxied} from \\\"./vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {AutomateStorage} from \\\"./AutomateStorage.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./libraries/LibEvents.sol\\\";\\nimport {LibTaskId} from \\\"./libraries/LibTaskId.sol\\\";\\nimport {LibTaskModule} from \\\"./libraries/LibTaskModule.sol\\\";\\nimport {LibBypassModule} from \\\"./libraries/LibBypassModule.sol\\\";\\nimport {IAutomate} from \\\"./interfaces/IAutomate.sol\\\";\\n\\n/**\\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\\n * @notice Modules allow users to customise conditions and specifications when creating a task.\\n */\\n//solhint-disable function-max-lines\\n//solhint-disable no-empty-blocks\\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\\n using GelatoBytes for bytes;\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n // solhint-disable const-name-snakecase\\n string public constant version = \\\"7\\\";\\n\\n constructor(address payable _gelato) Gelatofied(_gelato) {}\\n\\n ///@inheritdoc IAutomate\\n function createTask(\\n address _execAddress,\\n bytes calldata _execDataOrSelector,\\n LibDataTypes.ModuleData calldata _moduleData,\\n address _feeToken\\n ) external override returns (bytes32 taskId) {\\n address taskCreator;\\n\\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\\n msg.sender,\\n _execAddress,\\n taskModuleAddresses\\n );\\n\\n taskId = _createTask(\\n taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function cancelTask(bytes32 _taskId) external {\\n address _taskCreator = LibTaskModule.preCancelTask(\\n _taskId,\\n msg.sender,\\n taskModuleAddresses\\n );\\n\\n _cancelTask(_taskCreator, _taskId);\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n uint256 _txFee,\\n address _feeToken,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecSuccess(\\n _txFee,\\n _feeToken,\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function exec1Balance(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData calldata _moduleData,\\n Gelato1BalanceParam calldata _oneBalanceParam,\\n bool _revertOnFailure\\n ) external onlyGelato {\\n bytes32 taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execData.memorySliceSelector(),\\n _moduleData,\\n address(0)\\n );\\n\\n require(\\n _createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibTaskModule.onExecTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.modules,\\n _revertOnFailure,\\n taskModuleAddresses\\n );\\n\\n emit LibEvents.ExecSuccess(\\n 0,\\n address(0),\\n _execAddress,\\n _execData,\\n taskId,\\n success\\n );\\n\\n emit LogUseGelato1Balance(\\n _oneBalanceParam.sponsor,\\n _execAddress,\\n _oneBalanceParam.feeToken,\\n _oneBalanceParam.oneBalanceChainId,\\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\\n _oneBalanceParam.correlationId\\n );\\n }\\n\\n function execBypassModuleSyncFee(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n uint256 _txFee,\\n address _feeToken,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n fee = _txFee;\\n feeToken = _feeToken;\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n delete fee;\\n delete feeToken;\\n\\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\\n _taskId,\\n _txFee,\\n _feeToken,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function execBypassModule(\\n address _taskCreator,\\n address _execAddress,\\n bytes32 _taskId,\\n bytes32 _correlationId,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec\\n ) external onlyGelato {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.exec: Task not found\\\"\\n );\\n\\n bool success = LibBypassModule.onExecTask(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _revertOnFailure,\\n _singleExec,\\n _createdTasks\\n );\\n\\n emit LibEvents.ExecBypassModuleSuccess(\\n _taskId,\\n _correlationId,\\n success\\n );\\n }\\n\\n ///@inheritdoc IAutomate\\n function setModule(\\n LibDataTypes.Module[] calldata _modules,\\n address[] calldata _moduleAddresses\\n ) external onlyProxyAdmin {\\n uint256 length = _modules.length;\\n for (uint256 i; i < length; i++) {\\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\\n }\\n }\\n\\n ///@inheritdoc IAutomate\\n function getFeeDetails() external view returns (uint256, address) {\\n return (fee, feeToken);\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskIdsByUser(address _taskCreator)\\n external\\n view\\n returns (bytes32[] memory)\\n {\\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\\n\\n return taskIds;\\n }\\n\\n ///@inheritdoc IAutomate\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n );\\n }\\n\\n function _createTask(\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execDataOrSelector,\\n LibDataTypes.ModuleData memory _moduleData,\\n address _feeToken\\n ) private returns (bytes32 taskId) {\\n taskId = LibTaskId.getTaskId(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector.memorySliceSelector(),\\n _moduleData,\\n _feeToken\\n );\\n\\n require(\\n !_createdTasks[_taskCreator].contains(taskId),\\n \\\"Automate.createTask: Duplicate task\\\"\\n );\\n\\n LibTaskModule.onCreateTask(\\n taskId,\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n taskModuleAddresses\\n );\\n\\n _createdTasks[_taskCreator].add(taskId);\\n\\n emit LibEvents.TaskCreated(\\n _taskCreator,\\n _execAddress,\\n _execDataOrSelector,\\n _moduleData,\\n _feeToken,\\n taskId\\n );\\n }\\n\\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\\n require(\\n _createdTasks[_taskCreator].contains(_taskId),\\n \\\"Automate.cancelTask: Task not found\\\"\\n );\\n\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x08c794ce79fa02058b71a7ac8a583bcca9ccf0fe34a59e2960590de6664c8e03\",\"license\":\"UNLICENSED\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/functions/FUtils.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\nfunction _transfer(\\n address payable _to,\\n address _paymentToken,\\n uint256 _amount\\n) {\\n if (_paymentToken == ETH) {\\n (bool success, ) = _to.call{value: _amount}(\\\"\\\");\\n require(success, \\\"_transfer: ETH transfer failed\\\");\\n } else {\\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0xecf150c4e9030703ac85cd5192fb98eca2e68a8df00ca50efd99fc8813cfb4a2\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IAutomate.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {IGelato1Balance} from \\\"./IGelato1Balance.sol\\\";\\n\\n// solhint-disable max-line-length\\ninterface IAutomate is IGelato1Balance {\\n /**\\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\\n *\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n *\\n * @return taskId Unique hash of the task created.\\n */\\n function createTask(\\n address execAddress,\\n bytes calldata execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n address feeToken\\n ) external returns (bytes32 taskId);\\n\\n /**\\n * @notice Terminates a task that was created and Gelato can no longer execute it.\\n *\\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\\n */\\n function cancelTask(bytes32 taskId) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n uint256 txFee,\\n address feeToken,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n */\\n function exec1Balance(\\n address taskCreator,\\n address execAddress,\\n bytes memory execData,\\n LibDataTypes.ModuleData calldata moduleData,\\n Gelato1BalanceParam calldata oneBalanceParam,\\n bool revertOnFailure\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModule(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n bytes32 correlationId,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called by Gelato.\\n * @param taskId Unique hash of the task.\\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\\n */\\n function execBypassModuleSyncFee(\\n address taskCreator,\\n address execAddress,\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bytes memory execData,\\n bool revertOnFailure,\\n bool singleExec\\n ) external;\\n\\n /**\\n * @notice Sets the address of task modules. Only callable by proxy admin.\\n *\\n * @param modules List of modules to be set\\n * @param moduleAddresses List of addresses for respective modules.\\n */\\n function setModule(\\n LibDataTypes.Module[] calldata modules,\\n address[] calldata moduleAddresses\\n ) external;\\n\\n /**\\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\\n *\\n * @return uint256 Fee amount to be paid.\\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\\n */\\n function getFeeDetails() external view returns (uint256, address);\\n\\n /**\\n * @notice Helper func to query all open tasks by a task creator.\\n *\\n * @param taskCreator Address of task creator to query.\\n *\\n * @return bytes32[] List of taskIds created.\\n */\\n function getTaskIdsByUser(address taskCreator)\\n external\\n view\\n returns (bytes32[] memory);\\n\\n /**\\n * @notice Helper function to compute task id with module arguments\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) external pure returns (bytes32 taskId);\\n}\\n\",\"keccak256\":\"0x3b8418bf4df5b5b4fa137b34f857e8d088f785d41f6c7e1e86bf64b6bb3df323\",\"license\":\"MIT\"},\"contracts/interfaces/IGelato1Balance.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGelato1Balance {\\n struct Gelato1BalanceParam {\\n address sponsor;\\n address feeToken;\\n uint256 oneBalanceChainId;\\n uint256 nativeToFeeTokenXRateNumerator;\\n uint256 nativeToFeeTokenXRateDenominator;\\n bytes32 correlationId;\\n }\\n\\n event LogUseGelato1Balance(\\n address indexed sponsor,\\n address indexed target,\\n address indexed feeToken,\\n uint256 oneBalanceChainId,\\n uint256 nativeToFeeTokenXRateNumerator,\\n uint256 nativeToFeeTokenXRateDenominator,\\n bytes32 correlationId\\n );\\n}\\n\",\"keccak256\":\"0xbe0b342ff2bd982b3461f95d6410b0c385f883a5e6b9ba8ed9fb4e11da0d3dee\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibBypassModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibEvents} from \\\"./LibEvents.sol\\\";\\nimport {LibTaskModule} from \\\"./LibTaskModule.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Simplified library for task executions\\nlibrary LibBypassModule {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param _singleExec If task is a single exec task.\\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n bool _revertOnFailure,\\n bool _singleExec,\\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\\n ) internal returns (bool callSuccess) {\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n if (_singleExec) {\\n _createdTasks[_taskCreator].remove(_taskId);\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb6c9143d267faf8faa834fa772098fd79b1b62eb626c816e66a0866540d2adea\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskId.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to compute taskId of tasks.\\n */\\n// solhint-disable max-line-length\\nlibrary LibTaskId {\\n /**\\n * @notice Returns taskId of taskCreator.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execSelector Signature of the function which will be called by Gelato.\\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\\n */\\n function getTaskId(\\n address taskCreator,\\n address execAddress,\\n bytes4 execSelector,\\n LibDataTypes.ModuleData memory moduleData,\\n address feeToken\\n ) internal pure returns (bytes32 taskId) {\\n taskId = keccak256(\\n abi.encode(\\n taskCreator,\\n execAddress,\\n execSelector,\\n moduleData,\\n feeToken\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf4ac05463cdeac121b21724ea65d563caebbc4c2eb8b4ca39f6391639a1f794e\",\"license\":\"UNLICENSED\"},\"contracts/libraries/LibTaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {_call, _delegateCall} from \\\"../functions/FExec.sol\\\";\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\nimport {LibTaskModuleConfig} from \\\"./LibTaskModuleConfig.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable function-max-lines\\n/// @notice Library to call task modules on task creation and execution.\\nlibrary LibTaskModule {\\n using LibTaskModuleConfig for LibDataTypes.Module;\\n\\n /**\\n * @notice Delegate calls task modules before generating taskId.\\n *\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCreateTask(\\n address _taskCreator,\\n address _execAddress,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address, address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n if (!module.requirePreCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCreateTask.selector,\\n _taskCreator,\\n _execAddress\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCreateTask: \\\"\\n );\\n\\n (_taskCreator, _execAddress) = abi.decode(\\n returnData,\\n (address, address)\\n );\\n }\\n\\n return (_taskCreator, _execAddress);\\n }\\n\\n /**\\n * @notice Delegate calls task modules on create task to initialise them.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onCreateTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.ModuleData memory _moduleData,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal {\\n uint256 length = _moduleData.modules.length;\\n\\n _validModules(_moduleData.modules);\\n\\n for (uint256 i; i < length; i++) {\\n LibDataTypes.Module module = _moduleData.modules[i];\\n if (!module.requireOnCreate()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.onCreateTask.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _moduleData.args[i]\\n );\\n\\n _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.onCreateTask: \\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Delegate calls task modules before removing task.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator The address which created the task.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function preCancelTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (address) {\\n uint256 length = uint256(type(LibDataTypes.Module).max);\\n\\n for (uint256 i; i <= length; i++) {\\n LibDataTypes.Module module = LibDataTypes.Module(i);\\n\\n if (!module.requirePreCancel()) continue;\\n\\n address moduleAddress = taskModuleAddresses[module];\\n _moduleInitialised(moduleAddress);\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preCancelTask.selector,\\n _taskId,\\n _taskCreator\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n moduleAddress,\\n delegatecallData,\\n \\\"Automate.preCancelTask: \\\"\\n );\\n\\n (_taskCreator) = abi.decode(returnData, (address));\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @notice Delegate calls task modules on exec.\\n *\\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param _taskCreator Address which created the task.\\n * @param _execAddress Address of contract that will be called by Gelato.\\n * @param _execData Execution data to be called with / function selector.\\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\\n * @param _revertOnFailure To revert or not if call to execAddress fails.\\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\\n */\\n function onExecTask(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n bool _revertOnFailure,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) internal returns (bool callSuccess) {\\n address[] memory moduleAddresses = _getModuleAddresses(\\n _modules,\\n taskModuleAddresses\\n );\\n\\n (_execAddress, _execData) = preExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n\\n (callSuccess, ) = _call(\\n _execAddress,\\n abi.encodePacked(_execData, _taskCreator),\\n 0,\\n _revertOnFailure,\\n \\\"Automate.exec: \\\"\\n );\\n\\n postExecCall(\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData,\\n _modules,\\n moduleAddresses\\n );\\n }\\n\\n function preExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal returns (address, bytes memory) {\\n uint256 length = _modules.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePreExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.preExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n (, bytes memory returnData) = _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.preExecCall: \\\"\\n );\\n\\n (_execAddress, _execData) = abi.decode(\\n returnData,\\n (address, bytes)\\n );\\n }\\n return (_execAddress, _execData);\\n }\\n\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address _execAddress,\\n bytes memory _execData,\\n LibDataTypes.Module[] memory _modules,\\n address[] memory _moduleAddresses\\n ) internal {\\n uint256 length = _moduleAddresses.length;\\n\\n for (uint256 i; i < length; i++) {\\n if (!_modules[i].requirePostExec()) continue;\\n\\n bytes memory delegatecallData = abi.encodeWithSelector(\\n ITaskModule.postExecCall.selector,\\n _taskId,\\n _taskCreator,\\n _execAddress,\\n _execData\\n );\\n\\n _delegateCall(\\n _moduleAddresses[i],\\n delegatecallData,\\n \\\"Automate.postExecCall: \\\"\\n );\\n }\\n }\\n\\n function _getModuleAddresses(\\n LibDataTypes.Module[] memory _modules,\\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\\n ) private view returns (address[] memory) {\\n uint256 length = _modules.length;\\n address[] memory moduleAddresses = new address[](length);\\n\\n for (uint256 i; i < length; i++) {\\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\\n }\\n\\n return moduleAddresses;\\n }\\n\\n function _moduleInitialised(address _moduleAddress) private pure {\\n require(\\n _moduleAddress != address(0),\\n \\\"Automate._moduleInitialised: Not init\\\"\\n );\\n }\\n\\n /**\\n * @dev\\n * - No duplicate modules\\n * - No deprecated TIME\\n * - No RESOLVER && WEB3_FUNCTION\\n * - PROXY is required\\n */\\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\\n uint256 length = _modules.length;\\n\\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\\n bool[] memory exists = new bool[](existsLength);\\n\\n for (uint256 i = 0; i < length; i++) {\\n if (i > 0) {\\n require(\\n _modules[i] > _modules[i - 1],\\n \\\"Automate._validModules: Asc only\\\"\\n );\\n }\\n\\n exists[uint256(_modules[i])] = true;\\n }\\n\\n require(\\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\\n \\\"Automate._validModules: TIME is deprecated\\\"\\n );\\n\\n require(\\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\\n \\\"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\\\"\\n );\\n\\n require(\\n exists[uint256(LibDataTypes.Module.PROXY)],\\n \\\"Automate._validModules: PROXY is required\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84e6a981700f6a9e60f54e9b6e7dc70cac1f6b8b57bb1aabf9ef819ded0e7bda\",\"license\":\"MIT\"},\"contracts/libraries/LibTaskModuleConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\\n */\\nlibrary LibTaskModuleConfig {\\n function requirePreCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreCancel(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requireOnCreate(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePreExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.PROXY) return true;\\n\\n return false;\\n }\\n\\n function requirePostExec(LibDataTypes.Module _module)\\n internal\\n pure\\n returns (bool)\\n {\\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\\n\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x71520494c231850933897b878f4e719a8f8177f0b3d33a356184b8c426c4442a\",\"license\":\"MIT\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n SafeERC20,\\n IERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {_transfer, ETH} from \\\"../../functions/FUtils.sol\\\";\\n\\nabstract contract Gelatofied {\\n address payable public immutable gelato;\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n _transfer(gelato, _paymentToken, _amount);\\n }\\n\\n modifier onlyGelato() {\\n require(msg.sender == gelato, \\\"Gelatofied: Only gelato\\\");\\n _;\\n }\\n\\n constructor(address payable _gelato) {\\n gelato = _gelato;\\n }\\n}\\n\",\"keccak256\":\"0x61ed0699b2adf55087ddccc22c2ac91cffb92048af40a491ef5b6ac798c60cc1\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004a8538038062004a858339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493d62000148600039600081816104710152818161072e015281816107ab01528181610a890152610e37015261493d6000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a9c565b6103e6565b60405161014d9190612b91565b60405180910390f35b610170600480360381019061016b9190612bdf565b61043c565b60405161017d9190612c1b565b60405180910390f35b6101a0600480360381019061019b9190612dea565b61046f565b005b6101bc60048036038101906101b79190613174565b61065c565b6040516101c9919061321a565b60405180910390f35b6101ec60048036038101906101e791906132b4565b610676565b6040516101f9919061321a565b60405180910390f35b61020a6106f3565b60405161021791906133e0565b60405180910390f35b61022861072c565b6040516102359190613423565b60405180910390f35b610246610750565b6040516102539190612c1b565b60405180910390f35b61027660048036038101906102719190612bdf565b610776565b6040516102839190612c1b565b60405180910390f35b6102a660048036038101906102a1919061343e565b6107a9565b005b6102c260048036038101906102bd91906135a8565b610920565b005b6102de60048036038101906102d99190613648565b610a87565b005b6102fa60048036038101906102f59190612bdf565b610d57565b604051610307919061371e565b60405180910390f35b610318610d6f565b604051610326929190613739565b60405180910390f35b61034960048036038101906103449190612bdf565b610da0565b60405161035792919061378d565b60405180910390f35b61037a600480360381019061037591906137b6565b610dfc565b6040516103879190612c1b565b60405180910390f35b610398610e2f565b6040516103a5919061371e565b60405180910390f35b6103c860048036038101906103c391906137e3565b610e35565b005b6103e460048036038101906103df9190612bdf565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f490613909565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613975565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a8787876002611116565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d8787878460405161064994939291906139a4565b60405180910390a1505050505050505050565b600061066b868686868661121d565b905095945050505050565b60008061068533886006611259565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139e9565b8761142f565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e90613909565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613975565b60405180910390fd5b60006108d98689898787876002611116565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139fc565b60405180910390a15050505050505050565b6109286115ad565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a7f565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a9f565b5b90506020020160208101906109d09190612a9c565b600660008888858181106109e7576109e6613a9f565b5b90506020020160208101906109fc91906137b6565b6005811115610a0e57610a0d613ace565b5b6005811115610a2057610a1f613ace565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b2c565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c90613909565b60405180910390fd5b6000610b368787610b25886115d6565b87610b2f906139e9565b600061121d565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613975565b60405180910390fd5b6000610c2982898989898060000190610be19190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c3b565b60405180910390a4836020016020810190610caa9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a9c565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c79565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba90613909565b60405180910390fd5b6000610ee38888610ed3896115d6565b88610edd906139e9565b8761121d565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613975565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b83565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505088600661174f565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c3b565b60405180910390a4505050505050505050565b60006110ce823360066117f7565b90506110da81836119b4565b5050565b606060006110ee83600001611ad3565b905060608190508092505050919050565b600061110e8360000183611b2f565b905092915050565b600061117c86868960405160200161112f929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809150508215611212576111d7888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098888604051611209929190613d6a565b60405180910390a15b979650505050505050565b60008585858585604051602001611238959493929190613fe9565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561127357611272613ace565b5b61127d9190614043565b905060005b8181101561141f57600081600581111561129f5761129e613ace565b5b90506112bc8160058111156112b7576112b6613ace565b5b611c03565b6112c6575061140c565b60008660008360058111156112de576112dd613ace565b5b60058111156112f0576112ef613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061132a81611c44565b60006376474e6a60e01b8a8a604051602401611347929190614099565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113e883836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611cb6565b915050808060200190518101906113ff91906140ee565b809b50819c505050505050505b808061141790613b2c565b915050611282565b5085859250925050935093915050565b6000611446868661143f876115d6565b868661121d565b905061149981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b156114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d0906141a0565b60405180910390fd5b6114e881878787876006611d40565b61153981600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f1190919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161159c939291906141c0565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115ee576115ed613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061165257611651613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116b6576116b5613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061171857611717613a9f565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b60008061175c8584611f28565b905061176c898989898986612065565b80975081985050506117d887878a60405160200161178b929190613d42565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b52565b50809250506117eb8989898989866121d8565b50979650505050505050565b60008060058081111561180d5761180c613ace565b5b905060005b8181116119a857600081600581111561182e5761182d613ace565b5b905061184b81600581111561184657611845613ace565b5b61231e565b6118555750611995565b600085600083600581111561186d5761186c613ace565b5b600581111561187f5761187e613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118b981611c44565b60006314ae992660e01b89896040516024016118d6929190613d6a565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061197783836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611cb6565b9150508080602001905181019061198e9190614205565b9850505050505b80806119a090613b2c565b915050611812565b50839150509392505050565b611a0581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110ff90919063ffffffff16565b611a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3b906142a4565b60405180910390fd5b611a9581600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611bec90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611ac7929190613d6a565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b2357602002820191906000526020600020905b815481526020019060010190808311611b0f575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7c91906142c4565b60006040518083038185875af1925050503d8060008114611bb9576040519150601f19603f3d011682016040523d82523d6000602084013e611bbe565b606091505b50809250819350505081158015611bd25750835b15611be257611be1818461235f565b5b9550959350505050565b6000611bfb83600001836124c6565b905092915050565b600060026005811115611c1957611c18613ace565b5b826005811115611c2c57611c2b613ace565b5b03611c3a5760019050611c3f565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa9061434d565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cdf91906142c4565b600060405180830381855af49150503d8060008114611d1a576040519150601f19603f3d011682016040523d82523d6000602084013e611d1f565b606091505b50809250819350505081611d3857611d37818461235f565b5b935093915050565b60008260000151519050611d5783600001516125da565b60005b81811015611f0757600084600001518281518110611d7b57611d7a613a9f565b5b60200260200101519050611da0816005811115611d9b57611d9a613ace565b5b6128f7565b611daa5750611ef4565b6000846000836005811115611dc257611dc1613ace565b5b6005811115611dd457611dd3613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0e81611c44565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e3357611e32613a9f565b5b6020026020010151604051602401611e4f95949392919061436d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eee82826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611cb6565b50505050505b8080611eff90613b2c565b915050611d5a565b5050505050505050565b6000611f208360000183612938565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4c57611f4b612c87565b5b604051908082528060200260200182016040528015611f7a5781602001602082028036833780820191505090505b50905060005b8281101561205957846000878381518110611f9e57611f9d613a9f565b5b60200260200101516005811115611fb857611fb7613ace565b5b6005811115611fca57611fc9613ace565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200c5761200b613a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061205190613b2c565b915050611f80565b50809250505092915050565b6000606060008451905060005b818110156121c5576120af8682815181106120905761208f613a9f565b5b602002602001015160058111156120aa576120a9613ace565b5b6129a8565b156121b257600063c10304f760e01b8b8b8b8b6040516024016120d594939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061219087848151811061214c5761214b613a9f565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611cb6565b915050808060200190518101906121a7919061448a565b809a50819b50505050505b80806121bd90613b2c565b915050612072565b5086869250925050965096945050505050565b60008151905060005b818110156123145761221e8482815181106121ff576121fe613a9f565b5b6020026020010151600581111561221957612218613ace565b5b6129e9565b1561230157600063b2db0b4160e01b8989898960405160240161224494939291906143ce565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122fd8483815181106122b9576122b8613a9f565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611cb6565b5050505b808061230c90613b2c565b9150506121e1565b5050505050505050565b60006002600581111561233457612333613ace565b5b82600581111561234757612346613ace565b5b03612355576001905061235a565b600090505b919050565b60046020835161236f9190614515565b0361246a576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361240e5760448301925081836040516020016123c3929190614582565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240591906133e0565b60405180910390fd5b8160405160200161241f91906145f2565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246191906133e0565b60405180910390fd5b8060405160200161247b9190614660565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124bd91906133e0565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125ce5760006001826124f89190614682565b90506000600186600001805490506125109190614682565b905081811461257f57600086600001828154811061253157612530613a9f565b5b906000526020600020015490508087600001848154811061255557612554613a9f565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612593576125926146b6565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125d4565b60009150505b92915050565b600081519050600060016005808111156125f7576125f6613ace565b5b6126019190614043565b905060008167ffffffffffffffff81111561261f5761261e612c87565b5b60405190808252806020026020018201604052801561264d5781602001602082028036833780820191505090505b50905060005b8381101561277157600081111561270b57846001826126729190614682565b8151811061268357612682613a9f565b5b6020026020010151600581111561269d5761269c613ace565b5b8582815181106126b0576126af613a9f565b5b602002602001015160058111156126ca576126c9613ace565b5b1161270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614731565b60405180910390fd5b5b60018286838151811061272157612720613a9f565b5b6020026020010151600581111561273b5761273a613ace565b5b8151811061274c5761274b613a9f565b5b602002602001019015159081151581525050808061276990613b2c565b915050612653565b50806001600581111561278757612786613ace565b5b8151811061279857612797613a9f565b5b6020026020010151156127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d7906147c3565b60405180910390fd5b80600060058111156127f5576127f4613ace565b5b8151811061280657612805613a9f565b5b602002602001015180156128445750806004600581111561282a57612829613ace565b5b8151811061283b5761283a613a9f565b5b60200260200101515b15612884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161287b90614855565b60405180910390fd5b806002600581111561289957612898613ace565b5b815181106128aa576128a9613a9f565b5b60200260200101516128f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e8906148e7565b60405180910390fd5b50505050565b60006002600581111561290d5761290c613ace565b5b8260058111156129205761291f613ace565b5b0361292e5760019050612933565b600090505b919050565b60006129448383611b2f565b61299d5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506129a2565b600090505b92915050565b6000600260058111156129be576129bd613ace565b5b8260058111156129d1576129d0613ace565b5b036129df57600190506129e4565b600090505b919050565b6000600360058111156129ff576129fe613ace565b5b826005811115612a1257612a11613ace565b5b03612a205760019050612a25565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a6982612a3e565b9050919050565b612a7981612a5e565b8114612a8457600080fd5b50565b600081359050612a9681612a70565b92915050565b600060208284031215612ab257612ab1612a34565b5b6000612ac084828501612a87565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612b0881612af5565b82525050565b6000612b1a8383612aff565b60208301905092915050565b6000602082019050919050565b6000612b3e82612ac9565b612b488185612ad4565b9350612b5383612ae5565b8060005b83811015612b84578151612b6b8882612b0e565b9750612b7683612b26565b925050600181019050612b57565b5085935050505092915050565b60006020820190508181036000830152612bab8184612b33565b905092915050565b612bbc81612af5565b8114612bc757600080fd5b50565b600081359050612bd981612bb3565b92915050565b600060208284031215612bf557612bf4612a34565b5b6000612c0384828501612bca565b91505092915050565b612c1581612a5e565b82525050565b6000602082019050612c306000830184612c0c565b92915050565b6000819050919050565b612c4981612c36565b8114612c5457600080fd5b50565b600081359050612c6681612c40565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cbf82612c76565b810181811067ffffffffffffffff82111715612cde57612cdd612c87565b5b80604052505050565b6000612cf1612a2a565b9050612cfd8282612cb6565b919050565b600067ffffffffffffffff821115612d1d57612d1c612c87565b5b612d2682612c76565b9050602081019050919050565b82818337600083830152505050565b6000612d55612d5084612d02565b612ce7565b905082815260208101848484011115612d7157612d70612c71565b5b612d7c848285612d33565b509392505050565b600082601f830112612d9957612d98612c6c565b5b8135612da9848260208601612d42565b91505092915050565b60008115159050919050565b612dc781612db2565b8114612dd257600080fd5b50565b600081359050612de481612dbe565b92915050565b600080600080600080600080610100898b031215612e0b57612e0a612a34565b5b6000612e198b828c01612a87565b9850506020612e2a8b828c01612a87565b9750506040612e3b8b828c01612bca565b9650506060612e4c8b828c01612c57565b9550506080612e5d8b828c01612a87565b94505060a089013567ffffffffffffffff811115612e7e57612e7d612a39565b5b612e8a8b828c01612d84565b93505060c0612e9b8b828c01612dd5565b92505060e0612eac8b828c01612dd5565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ef181612ebc565b8114612efc57600080fd5b50565b600081359050612f0e81612ee8565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f3957612f38612c87565b5b602082029050602081019050919050565b600080fd5b60068110612f5c57600080fd5b50565b600081359050612f6e81612f4f565b92915050565b6000612f87612f8284612f1e565b612ce7565b90508083825260208201905060208402830185811115612faa57612fa9612f4a565b5b835b81811015612fd35780612fbf8882612f5f565b845260208401935050602081019050612fac565b5050509392505050565b600082601f830112612ff257612ff1612c6c565b5b8135613002848260208601612f74565b91505092915050565b600067ffffffffffffffff82111561302657613025612c87565b5b602082029050602081019050919050565b600061304a6130458461300b565b612ce7565b9050808382526020820190506020840283018581111561306d5761306c612f4a565b5b835b818110156130b457803567ffffffffffffffff81111561309257613091612c6c565b5b80860161309f8982612d84565b8552602085019450505060208101905061306f565b5050509392505050565b600082601f8301126130d3576130d2612c6c565b5b81356130e3848260208601613037565b91505092915050565b60006040828403121561310257613101612f14565b5b61310c6040612ce7565b9050600082013567ffffffffffffffff81111561312c5761312b612f19565b5b61313884828501612fdd565b600083015250602082013567ffffffffffffffff81111561315c5761315b612f19565b5b613168848285016130be565b60208301525092915050565b600080600080600060a086880312156131905761318f612a34565b5b600061319e88828901612a87565b95505060206131af88828901612a87565b94505060406131c088828901612eff565b935050606086013567ffffffffffffffff8111156131e1576131e0612a39565b5b6131ed888289016130ec565b92505060806131fe88828901612a87565b9150509295509295909350565b61321481612af5565b82525050565b600060208201905061322f600083018461320b565b92915050565b600080fd5b60008083601f8401126132505761324f612c6c565b5b8235905067ffffffffffffffff81111561326d5761326c613235565b5b60208301915083600182028301111561328957613288612f4a565b5b9250929050565b600080fd5b6000604082840312156132ab576132aa613290565b5b81905092915050565b6000806000806000608086880312156132d0576132cf612a34565b5b60006132de88828901612a87565b955050602086013567ffffffffffffffff8111156132ff576132fe612a39565b5b61330b8882890161323a565b9450945050604086013567ffffffffffffffff81111561332e5761332d612a39565b5b61333a88828901613295565b925050606061334b88828901612a87565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b83811015613392578082015181840152602081019050613377565b838111156133a1576000848401525b50505050565b60006133b282613358565b6133bc8185613363565b93506133cc818560208601613374565b6133d581612c76565b840191505092915050565b600060208201905081810360008301526133fa81846133a7565b905092915050565b600061340d82612a3e565b9050919050565b61341d81613402565b82525050565b60006020820190506134386000830184613414565b92915050565b600080600080600080600060e0888a03121561345d5761345c612a34565b5b600061346b8a828b01612a87565b975050602061347c8a828b01612a87565b965050604061348d8a828b01612bca565b955050606061349e8a828b01612bca565b945050608088013567ffffffffffffffff8111156134bf576134be612a39565b5b6134cb8a828b01612d84565b93505060a06134dc8a828b01612dd5565b92505060c06134ed8a828b01612dd5565b91505092959891949750929550565b60008083601f84011261351257613511612c6c565b5b8235905067ffffffffffffffff81111561352f5761352e613235565b5b60208301915083602082028301111561354b5761354a612f4a565b5b9250929050565b60008083601f84011261356857613567612c6c565b5b8235905067ffffffffffffffff81111561358557613584613235565b5b6020830191508360208202830111156135a1576135a0612f4a565b5b9250929050565b600080600080604085870312156135c2576135c1612a34565b5b600085013567ffffffffffffffff8111156135e0576135df612a39565b5b6135ec878288016134fc565b9450945050602085013567ffffffffffffffff81111561360f5761360e612a39565b5b61361b87828801613552565b925092505092959194509250565b600060c0828403121561363f5761363e613290565b5b81905092915050565b600080600080600080610160878903121561366657613665612a34565b5b600061367489828a01612a87565b965050602061368589828a01612a87565b955050604087013567ffffffffffffffff8111156136a6576136a5612a39565b5b6136b289828a01612d84565b945050606087013567ffffffffffffffff8111156136d3576136d2612a39565b5b6136df89828a01613295565b93505060806136f089828a01613629565b92505061014061370289828a01612dd5565b9150509295509295509295565b61371881612c36565b82525050565b6000602082019050613733600083018461370f565b92915050565b600060408201905061374e600083018561370f565b61375b6020830184612c0c565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61378781613762565b82525050565b60006040820190506137a2600083018561377e565b6137af602083018461377e565b9392505050565b6000602082840312156137cc576137cb612a34565b5b60006137da84828501612f5f565b91505092915050565b600080600080600080600060e0888a03121561380257613801612a34565b5b60006138108a828b01612a87565b97505060206138218a828b01612a87565b965050604088013567ffffffffffffffff81111561384257613841612a39565b5b61384e8a828b01612d84565b955050606088013567ffffffffffffffff81111561386f5761386e612a39565b5b61387b8a828b01613295565b945050608061388c8a828b01612c57565b93505060a061389d8a828b01612a87565b92505060c06138ae8a828b01612dd5565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138f3601783613363565b91506138fe826138bd565b602082019050919050565b60006020820190508181036000830152613922816138e6565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b600061395f601d83613363565b915061396a82613929565b602082019050919050565b6000602082019050818103600083015261398e81613952565b9050919050565b61399e81612db2565b82525050565b60006080820190506139b9600083018761320b565b6139c6602083018661370f565b6139d36040830185612c0c565b6139e06060830184613995565b95945050505050565b60006139f536836130ec565b9050919050565b6000606082019050613a11600083018661320b565b613a1e602083018561320b565b613a2b6040830184613995565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a69600e83613363565b9150613a7482613a33565b602082019050919050565b60006020820190508181036000830152613a9881613a5c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b3782612c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b6957613b68613afd565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613ba057613b9f613b74565b5b80840192508235915067ffffffffffffffff821115613bc257613bc1613b79565b5b602083019250602082023603831315613bde57613bdd613b7e565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0d82613be6565b613c178185613bf1565b9350613c27818560208601613374565b613c3081612c76565b840191505092915050565b60006060820190508181036000830152613c558186613c02565b9050613c64602083018561320b565b613c716040830184613995565b949350505050565b6000608082019050613c8e600083018761370f565b613c9b602083018661370f565b613ca8604083018561370f565b613cb5606083018461320b565b95945050505050565b600081905092915050565b6000613cd482613be6565b613cde8185613cbe565b9350613cee818560208601613374565b80840191505092915050565b60008160601b9050919050565b6000613d1282613cfa565b9050919050565b6000613d2482613d07565b9050919050565b613d3c613d3782612a5e565b613d19565b82525050565b6000613d4e8285613cc9565b9150613d5a8284613d2b565b6014820191508190509392505050565b6000604082019050613d7f600083018561320b565b613d8c6020830184612c0c565b9392505050565b613d9c81612ebc565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613ddf57613dde613ace565b5b50565b6000819050613df082613dce565b919050565b6000613e0082613de2565b9050919050565b613e1081613df5565b82525050565b6000613e228383613e07565b60208301905092915050565b6000602082019050919050565b6000613e4682613da2565b613e508185613dad565b9350613e5b83613dbe565b8060005b83811015613e8c578151613e738882613e16565b9750613e7e83613e2e565b925050600181019050613e5f565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ee182613be6565b613eeb8185613ec5565b9350613efb818560208601613374565b613f0481612c76565b840191505092915050565b6000613f1b8383613ed6565b905092915050565b6000602082019050919050565b6000613f3b82613e99565b613f458185613ea4565b935083602082028501613f5785613eb5565b8060005b85811015613f935784840389528151613f748582613f0f565b9450613f7f83613f23565b925060208a01995050600181019050613f5b565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fc28282613e3b565b91505060208301518482036020860152613fdc8282613f30565b9150508091505092915050565b600060a082019050613ffe6000830188612c0c565b61400b6020830187612c0c565b6140186040830186613d93565b818103606083015261402a8185613fa5565b90506140396080830184612c0c565b9695505050505050565b600061404e82612c36565b915061405983612c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408e5761408d613afd565b5b828201905092915050565b60006040820190506140ae6000830185612c0c565b6140bb6020830184612c0c565b9392505050565b6140cb81613402565b81146140d657600080fd5b50565b6000815190506140e8816140c2565b92915050565b6000806040838503121561410557614104612a34565b5b6000614113858286016140d9565b9250506020614124858286016140d9565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061418a602383613363565b91506141958261412e565b604082019050919050565b600060208201905081810360008301526141b98161417d565b9050919050565b600060608201905081810360008301526141da8186613c02565b905081810360208301526141ee8185613fa5565b90506141fd6040830184612c0c565b949350505050565b60006020828403121561421b5761421a612a34565b5b6000614229848285016140d9565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b600061428e602383613363565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006142d08284613cc9565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b6000614337602583613363565b9150614342826142db565b604082019050919050565b600060208201905081810360008301526143668161432a565b9050919050565b600060a082019050614382600083018861320b565b61438f6020830187612c0c565b61439c6040830186612c0c565b81810360608301526143ae8185613c02565b905081810360808301526143c28184613c02565b90509695505050505050565b60006080820190506143e3600083018761320b565b6143f06020830186612c0c565b6143fd6040830185612c0c565b818103606083015261440f8184613c02565b905095945050505050565b600061442d61442884612d02565b612ce7565b90508281526020810184848401111561444957614448612c71565b5b614454848285613374565b509392505050565b600082601f83011261447157614470612c6c565b5b815161448184826020860161441a565b91505092915050565b600080604083850312156144a1576144a0612a34565b5b60006144af858286016140d9565b925050602083015167ffffffffffffffff8111156144d0576144cf612a39565b5b6144dc8582860161445c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061452082612c36565b915061452b83612c36565b92508261453b5761453a6144e6565b5b828206905092915050565b600081905092915050565b600061455c82613358565b6145668185614546565b9350614576818560208601613374565b80840191505092915050565b600061458e8285614551565b915061459a8284614551565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145dc600f83614546565b91506145e7826145a6565b600f82019050919050565b60006145fe8284614551565b9150614609826145cf565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061464a601483614546565b915061465582614614565b601482019050919050565b600061466c8284614551565b91506146778261463d565b915081905092915050565b600061468d82612c36565b915061469883612c36565b9250828210156146ab576146aa613afd565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061471b602083613363565b9150614726826146e5565b602082019050919050565b6000602082019050818103600083015261474a8161470e565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147ad602a83613363565b91506147b882614751565b604082019050919050565b600060208201905081810360008301526147dc816147a0565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b600061483f603683613363565b915061484a826147e3565b604082019050919050565b6000602082019050818103600083015261486e81614832565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148d1602983613363565b91506148dc82614875565b604082019050919050565b60006020820190508181036000830152614900816148c4565b905091905056fea26469706673582212205e3bb0f92dcdfca5d5820bc0efcc1723ff7968ee45e32a1b257e1f0b6e05cb6d64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "cancelTask(bytes32)": { + "params": { + "taskId": "Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}" + } + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}" + }, + "returns": { + "taskId": "Unique hash of the task created." + } + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "feeToken": "Token used to pay for the execution. ETH = 0xeeeeee...", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task.", + "txFee": "Fee paid to Gelato for execution, transfered to Gelato.feeCollector()." + } + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "params": { + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "oneBalanceParam": "Parameters required for fee payment with Gelato 1Balance.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "taskCreator": "The address which created the task." + } + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "params": { + "correlationId": "Id of the execution to be used for 1Balance settlement.", + "execAddress": "Address of contract that should be called by Gelato.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "revertOnFailure": "To revert or not if call to execAddress fails. (Used for off-chain simulations)", + "singleExec": "If the task is a SingleExec task. If true, task will be cancelled after execution.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task." + } + }, + "getFeeDetails()": { + "returns": { + "_0": "uint256 Fee amount to be paid.", + "_1": "address Token to be paid. (Determined and passed by taskCreator during createTask)" + } + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "params": { + "execAddress": "Address of contract that will be called by Gelato.", + "execSelector": "Signature of the function which will be called by Gelato.", + "feeToken": "Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.", + "moduleData": "Conditional modules that will be used. {See LibDataTypes-ModuleData}", + "taskCreator": "The address which created the task." + } + }, + "getTaskIdsByUser(address)": { + "params": { + "taskCreator": "Address of task creator to query." + }, + "returns": { + "_0": "bytes32[] List of taskIds created." + } + }, + "setModule(uint8[],address[])": { + "params": { + "moduleAddresses": "List of addresses for respective modules.", + "modules": "List of modules to be set" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "cancelTask(bytes32)": { + "notice": "Terminates a task that was created and Gelato can no longer execute it." + }, + "createTask(address,bytes,(uint8[],bytes[]),address)": { + "notice": "Initiates a task with conditions which Gelato will monitor and execute when conditions are met." + }, + "exec(address,address,bytes,(uint8[],bytes[]),uint256,address,bool)": { + "notice": "Execution API called by Gelato, using Sync Fee as fee payment method" + }, + "exec1Balance(address,address,bytes,(uint8[],bytes[]),(address,address,uint256,uint256,uint256,bytes32),bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "execBypassModule(address,address,bytes32,bytes32,bytes,bool,bool)": { + "notice": "Execution API called by Gelato, using Gelato 1Balance as fee payment method." + }, + "getFeeDetails()": { + "notice": "Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)" + }, + "getTaskId(address,address,bytes4,(uint8[],bytes[]),address)": { + "notice": "Helper function to compute task id with module arguments" + }, + "getTaskIdsByUser(address)": { + "notice": "Helper func to query all open tasks by a task creator." + }, + "setModule(uint8[],address[])": { + "notice": "Sets the address of task modules. Only callable by proxy admin." + } + }, + "notice": "Automate enables everyone to have Gelato monitor and execute transactions.ExecAddress refers to the contract that has the function which Gelato will call.Modules allow users to customise conditions and specifications when creating a task.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/Automate.sol:Automate", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/Automate.sol:Automate", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/Automate.sol:Automate", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/Automate.sol:Automate", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/Automate.sol:Automate", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/Automate.sol:Automate", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/Automate.sol:Automate", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/Automate.sol:Automate", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/Automate.sol:Automate", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/Automate.sol:Automate", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/Automate.sol:Automate", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/Automate.sol:Automate", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/Automate.sol:Automate", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/Automate_Proxy.json b/deployments/cornmaizenet/Automate_Proxy.json new file mode 100644 index 0000000..c57325b --- /dev/null +++ b/deployments/cornmaizenet/Automate_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x00000000040000000000000000000000000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000200000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020002000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0x8d45dfd38d03faf62675e308f4324ba8fddcb1d429c53e6f5691d3fd101e3fe6", + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 60996, + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x8d45dfd38d03faf62675e308f4324ba8fddcb1d429c53e6f5691d3fd101e3fe6" + }, + { + "transactionIndex": 1, + "blockNumber": 60996, + "transactionHash": "0x1beac68acd836ba4ad7a2637ed4374836b372cf87e2c898c548299698760fe7b", + "address": "0xafd37d0558255aA687167560cd3AaeEa75c2841E", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x8d45dfd38d03faf62675e308f4324ba8fddcb1d429c53e6f5691d3fd101e3fe6" + } + ], + "blockNumber": 60996, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/OpsProxy.json b/deployments/cornmaizenet/OpsProxy.json new file mode 100644 index 0000000..c7733a1 --- /dev/null +++ b/deployments/cornmaizenet/OpsProxy.json @@ -0,0 +1,220 @@ +{ + "address": "0x17430fbdc2CdF7bdB08899312aFB8230B7D8Ec64", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "name": "ExecuteCall", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_targets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "_datas", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchExecuteCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "executeCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x9473e2eb41bc14e77c3014c2c05322c9a223a8cab029f69046c57f90d0f717a9", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1042902", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1df552611386b67a75937fe476788898731ccff3e5ef4b1a12d7b5068aa9d17b", + "transactionHash": "0x9473e2eb41bc14e77c3014c2c05322c9a223a8cab029f69046c57f90d0f717a9", + "logs": [], + "blockNumber": 60998, + "cumulativeGasUsed": "1042902", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"name\":\"ExecuteCall\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_targets\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_datas\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_values\",\"type\":\"uint256[]\"}],\"name\":\"batchExecuteCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_target\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"executeCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"params\":{\"datas\":\"Datas for each contract call.\",\"targets\":\"Addresses of contracts to be called.\",\"values\":\"Native token value for each contract call.\"}},\"executeCall(address,bytes,uint256)\":{\"params\":{\"data\":\"Data for contract call.\",\"target\":\"Address of contracts to be called.\",\"value\":\"Native token value for contract call.\"}},\"owner()\":{\"returns\":{\"_0\":\"address Owner of the proxy\"}}},\"stateVariables\":{\"ops\":{\"return\":\"address Ops smart contract address\",\"returns\":{\"_0\":\"address Ops smart contract address\"}},\"version\":{\"return\":\"uint256 version of OpsProxy.\",\"returns\":{\"_0\":\"uint256 version of OpsProxy.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"ExecuteCall(address,bytes,uint256,bytes)\":{\"notice\":\"Emitted when proxy calls a contract successfully in `executeCall`\"}},\"kind\":\"user\",\"methods\":{\"batchExecuteCall(address[],bytes[],uint256[])\":{\"notice\":\"Multicall to different contracts with different datas.\"},\"executeCall(address,bytes,uint256)\":{\"notice\":\"Call to a single contract.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxy.sol\":\"OpsProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\n\\ncontract OpsProxy is Proxied, IOpsProxy {\\n // solhint-disable const-name-snakecase\\n uint256 public constant override version = 1;\\n address public immutable override ops;\\n\\n modifier onlyAuth() {\\n address proxyOwner = owner();\\n if (msg.sender != proxyOwner) {\\n require(msg.sender == ops, \\\"OpsProxy: Not authorised\\\");\\n require(\\n _getTaskCreator() == proxyOwner,\\n \\\"OpsProxy: Only tasks created by owner\\\"\\n );\\n } // else msg.sender == proxyOwner\\n _;\\n }\\n\\n // solhint-disable no-empty-blocks\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n receive() external payable {}\\n\\n ///@inheritdoc IOpsProxy\\n function batchExecuteCall(\\n address[] calldata _targets,\\n bytes[] calldata _datas,\\n uint256[] calldata _values\\n ) external payable override onlyAuth {\\n uint256 length = _targets.length;\\n require(\\n length == _datas.length && length == _values.length,\\n \\\"OpsProxy: Length mismatch\\\"\\n );\\n\\n for (uint256 i; i < length; i++)\\n _executeCall(_targets[i], _datas[i], _values[i]);\\n }\\n\\n ///@inheritdoc IOpsProxy\\n function executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) external payable override onlyAuth {\\n _executeCall(_target, _data, _value);\\n }\\n\\n function owner() public view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function _executeCall(\\n address _target,\\n bytes calldata _data,\\n uint256 _value\\n ) private {\\n (, bytes memory returnData) = _call(\\n _target,\\n _data,\\n _value,\\n true,\\n \\\"OpsProxy.executeCall: \\\"\\n );\\n\\n emit ExecuteCall(_target, _data, _value, returnData);\\n }\\n\\n function _getTaskCreator() private pure returns (address taskCreator) {\\n assembly {\\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5a2a44ed1843680adaff1fb47d27c29557e40f66492fce669f1ee7813578701\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001317380380620013178339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516111df6200013860003960008181610154015281816102be01526104b501526111df6000f3fe60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c806354132d781461005a57806354fd4d50146100765780638da5cb5b146100a1578063c0e8c0c2146100cc578063e70abe92146100e857610055565b3661005557005b600080fd5b610074600480360381019061006f91906108fa565b610113565b005b34801561008257600080fd5b5061008b610269565b604051610098919061097d565b60405180910390f35b3480156100ad57600080fd5b506100b661026e565b6040516100c391906109a7565b60405180910390f35b6100e660048036038101906100e19190610ac4565b61027d565b005b3480156100f457600080fd5b506100fd6104b3565b60405161010a91906109a7565b60405180910390f35b600061011d61026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610256577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d790610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166101ff6104d7565b73ffffffffffffffffffffffffffffffffffffffff1614610255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161024c90610c67565b60405180910390fd5b5b610262858585856104e6565b5050505050565b600181565b60006102786105cd565b905090565b600061028761026e565b90508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103c0577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034190610bd5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166103696104d7565b73ffffffffffffffffffffffffffffffffffffffff16146103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b690610c67565b60405180910390fd5b5b600087879050905085859050811480156103dc57508383905081145b61041b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041290610cd3565b60405180910390fd5b60005b818110156104a85761049589898381811061043c5761043b610cf3565b5b90506020020160208101906104519190610d22565b88888481811061046457610463610cf3565b5b90506020028101906104769190610d5e565b88888681811061048957610488610cf3565b5b905060200201356104e6565b80806104a090610df0565b91505061041e565b505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000601436033560601c905090565b600061056f8585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508460016040518060400160405280601681526020017f4f707350726f78792e6578656375746543616c6c3a20000000000000000000008152506105f6565b9150508473ffffffffffffffffffffffffffffffffffffffff167f8f8f4d49bbb03ffac818a5d588ec1786a4d2d17269871cbf5b1745f58b64c15d858585856040516105be9493929190610f0d565b60405180910390a25050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040516106209190610f90565b60006040518083038185875af1925050503d806000811461065d576040519150601f19603f3d011682016040523d82523d6000602084013e610662565b606091505b508092508193505050811580156106765750835b15610686576106858184610690565b5b9550959350505050565b6004602083516106a09190610fd6565b0361079b576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361073f5760448301925081836040516020016106f492919061104e565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073691906110ab565b60405180910390fd5b816040516020016107509190611119565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079291906110ab565b60405180910390fd5b806040516020016107ac9190611187565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ee91906110ab565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061082c82610801565b9050919050565b61083c81610821565b811461084757600080fd5b50565b60008135905061085981610833565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126108845761088361085f565b5b8235905067ffffffffffffffff8111156108a1576108a0610864565b5b6020830191508360018202830111156108bd576108bc610869565b5b9250929050565b6000819050919050565b6108d7816108c4565b81146108e257600080fd5b50565b6000813590506108f4816108ce565b92915050565b60008060008060608587031215610914576109136107f7565b5b60006109228782880161084a565b945050602085013567ffffffffffffffff811115610943576109426107fc565b5b61094f8782880161086e565b93509350506040610962878288016108e5565b91505092959194509250565b610977816108c4565b82525050565b6000602082019050610992600083018461096e565b92915050565b6109a181610821565b82525050565b60006020820190506109bc6000830184610998565b92915050565b60008083601f8401126109d8576109d761085f565b5b8235905067ffffffffffffffff8111156109f5576109f4610864565b5b602083019150836020820283011115610a1157610a10610869565b5b9250929050565b60008083601f840112610a2e57610a2d61085f565b5b8235905067ffffffffffffffff811115610a4b57610a4a610864565b5b602083019150836020820283011115610a6757610a66610869565b5b9250929050565b60008083601f840112610a8457610a8361085f565b5b8235905067ffffffffffffffff811115610aa157610aa0610864565b5b602083019150836020820283011115610abd57610abc610869565b5b9250929050565b60008060008060008060608789031215610ae157610ae06107f7565b5b600087013567ffffffffffffffff811115610aff57610afe6107fc565b5b610b0b89828a016109c2565b9650965050602087013567ffffffffffffffff811115610b2e57610b2d6107fc565b5b610b3a89828a01610a18565b9450945050604087013567ffffffffffffffff811115610b5d57610b5c6107fc565b5b610b6989828a01610a6e565b92509250509295509295509295565b600082825260208201905092915050565b7f4f707350726f78793a204e6f7420617574686f72697365640000000000000000600082015250565b6000610bbf601883610b78565b9150610bca82610b89565b602082019050919050565b60006020820190508181036000830152610bee81610bb2565b9050919050565b7f4f707350726f78793a204f6e6c79207461736b7320637265617465642062792060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000610c51602583610b78565b9150610c5c82610bf5565b604082019050919050565b60006020820190508181036000830152610c8081610c44565b9050919050565b7f4f707350726f78793a204c656e677468206d69736d6174636800000000000000600082015250565b6000610cbd601983610b78565b9150610cc882610c87565b602082019050919050565b60006020820190508181036000830152610cec81610cb0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215610d3857610d376107f7565b5b6000610d468482850161084a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112610d7b57610d7a610d4f565b5b80840192508235915067ffffffffffffffff821115610d9d57610d9c610d54565b5b602083019250600182023603831315610db957610db8610d59565b5b509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610dfb826108c4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e2d57610e2c610dc1565b5b600182019050919050565b600082825260208201905092915050565b82818337600083830152505050565b6000601f19601f8301169050919050565b6000610e758385610e38565b9350610e82838584610e49565b610e8b83610e58565b840190509392505050565b600081519050919050565b60005b83811015610ebf578082015181840152602081019050610ea4565b83811115610ece576000848401525b50505050565b6000610edf82610e96565b610ee98185610e38565b9350610ef9818560208601610ea1565b610f0281610e58565b840191505092915050565b60006060820190508181036000830152610f28818688610e69565b9050610f37602083018561096e565b8181036040830152610f498184610ed4565b905095945050505050565b600081905092915050565b6000610f6a82610e96565b610f748185610f54565b9350610f84818560208601610ea1565b80840191505092915050565b6000610f9c8284610f5f565b915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610fe1826108c4565b9150610fec836108c4565b925082610ffc57610ffb610fa7565b5b828206905092915050565b600081519050919050565b600081905092915050565b600061102882611007565b6110328185611012565b9350611042818560208601610ea1565b80840191505092915050565b600061105a828561101d565b9150611066828461101d565b91508190509392505050565b600061107d82611007565b6110878185610b78565b9350611097818560208601610ea1565b6110a081610e58565b840191505092915050565b600060208201905081810360008301526110c58184611072565b905092915050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000611103600f83611012565b915061110e826110cd565b600f82019050919050565b6000611125828461101d565b9150611130826110f6565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000611171601483611012565b915061117c8261113b565b601482019050919050565b6000611193828461101d565b915061119e82611164565b91508190509291505056fea2646970667358221220925e8abf4f8b318f74a9a344b29c6785f3cc7ee8f12ec00fec31b621e6bdc76064736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "params": { + "datas": "Datas for each contract call.", + "targets": "Addresses of contracts to be called.", + "values": "Native token value for each contract call." + } + }, + "executeCall(address,bytes,uint256)": { + "params": { + "data": "Data for contract call.", + "target": "Address of contracts to be called.", + "value": "Native token value for contract call." + } + }, + "owner()": { + "returns": { + "_0": "address Owner of the proxy" + } + } + }, + "stateVariables": { + "ops": { + "return": "address Ops smart contract address", + "returns": { + "_0": "address Ops smart contract address" + } + }, + "version": { + "return": "uint256 version of OpsProxy.", + "returns": { + "_0": "uint256 version of OpsProxy." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "ExecuteCall(address,bytes,uint256,bytes)": { + "notice": "Emitted when proxy calls a contract successfully in `executeCall`" + } + }, + "kind": "user", + "methods": { + "batchExecuteCall(address[],bytes[],uint256[])": { + "notice": "Multicall to different contracts with different datas." + }, + "executeCall(address,bytes,uint256)": { + "notice": "Call to a single contract." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/OpsProxyFactory.json b/deployments/cornmaizenet/OpsProxyFactory.json new file mode 100644 index 0000000..31f68da --- /dev/null +++ b/deployments/cornmaizenet/OpsProxyFactory.json @@ -0,0 +1,478 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x941330f51cb1a52b9ec62d091bbd70410b8a0e98dacbbe6b923e7be934c58110", + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 61000, + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x941330f51cb1a52b9ec62d091bbd70410b8a0e98dacbbe6b923e7be934c58110" + }, + { + "transactionIndex": 1, + "blockNumber": 61000, + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x941330f51cb1a52b9ec62d091bbd70410b8a0e98dacbbe6b923e7be934c58110" + } + ], + "blockNumber": 61000, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "implementation": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/OpsProxyFactory_Implementation.json b/deployments/cornmaizenet/OpsProxyFactory_Implementation.json new file mode 100644 index 0000000..c4aefed --- /dev/null +++ b/deployments/cornmaizenet/OpsProxyFactory_Implementation.json @@ -0,0 +1,457 @@ +{ + "address": "0x35d42A8e0de404895fAF726f65197660ff96F412", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ops", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "proxy", + "type": "address" + } + ], + "name": "DeployProxy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "SetImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "whitelisted", + "type": "bool" + } + ], + "name": "UpdateWhitelistedImplementation", + "type": "event" + }, + { + "inputs": [], + "name": "deploy", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployFor", + "outputs": [ + { + "internalType": "address payable", + "name": "proxy", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "determineProxyAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getProxyOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ops", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_proxy", + "type": "address" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newImplementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bool", + "name": "_whitelist", + "type": "bool" + } + ], + "name": "updateWhitelistedImplementations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "whitelistedImplementations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xef0211620fafa953f2bab7bb1f432a9a64914955f291ad14917b315ddf175939", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "2277168", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x8dca7d7c2a4750612075f74760117a15f174029969f146eee60c35b5959c6bc8", + "transactionHash": "0xef0211620fafa953f2bab7bb1f432a9a64914955f291ad14917b315ddf175939", + "logs": [], + "blockNumber": 60999, + "cumulativeGasUsed": "2277168", + "status": 1, + "byzantium": true + }, + "args": [ + "0xafd37d0558255aA687167560cd3AaeEa75c2841E" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ops\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"}],\"name\":\"DeployProxy\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"SetImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"whitelisted\",\"type\":\"bool\"}],\"name\":\"UpdateWhitelistedImplementation\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"deploy\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployFor\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"determineProxyAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getProxyOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ops\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newImplementation\",\"type\":\"address\"}],\"name\":\"setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_whitelist\",\"type\":\"bool\"}],\"name\":\"updateWhitelistedImplementations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedImplementations\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"deploy()\":{\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"deployFor(address)\":{\"params\":{\"owner\":\"Address to deploy the proxy for.\"},\"returns\":{\"proxy\":\"Address of deployed proxy.\"}},\"determineProxyAddress(address)\":{\"params\":{\"account\":\"Address to determine the proxy address for.\"}},\"getProxyOf(address)\":{\"returns\":{\"_0\":\"address Proxy address owned by account.\",\"_1\":\"bool Whether if proxy is deployed\"}},\"ownerOf(address)\":{\"returns\":{\"_0\":\"address Owner of deployed proxy.\"}}},\"stateVariables\":{\"_ownerOf\":{\"details\":\"track owner of proxy\"},\"_proxyOf\":{\"details\":\"track proxy of user\"},\"whitelistedImplementations\":{\"return\":\"bool Whether if implementation is whitelisted.\",\"returns\":{\"_0\":\"bool Whether if implementation is whitelisted.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"DeployProxy(address,address,address)\":{\"notice\":\"Emitted when an OpsProxy is deployed.\"},\"SetImplementation(address,address)\":{\"notice\":\"Emitted when OpsProxy implementation to be deployed is changed.\"},\"UpdateWhitelistedImplementation(address,bool)\":{\"notice\":\"Emitted when OpsProxy implementation is added or removed from whitelist.\"}},\"kind\":\"user\",\"methods\":{\"deploy()\":{\"notice\":\"Deploys OpsProxy for the msg.sender.\"},\"deployFor(address)\":{\"notice\":\"Deploys OpsProxy for another address.\"},\"determineProxyAddress(address)\":{\"notice\":\"Determines the OpsProxy address when it is not deployed.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/opsProxy/OpsProxyFactory.sol\":\"OpsProxyFactory\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/opsProxy/OpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {EIP173OpsProxy} from \\\"../vendor/proxy/EIP173/EIP173OpsProxy.sol\\\";\\nimport {Proxied} from \\\"../vendor/proxy/EIP173/Proxied.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\n// solhint-disable max-states-count\\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\\n address public immutable ops;\\n address public implementation;\\n mapping(address => bool) public override whitelistedImplementations;\\n\\n ///@dev track proxy of user\\n mapping(address => address) internal _proxyOf;\\n\\n ///@dev track owner of proxy\\n mapping(address => address) internal _ownerOf;\\n\\n modifier onlyOneProxy(address _account) {\\n require(_proxyOf[_account] == address(0), \\\"OpsProxyFactory: One proxy\\\");\\n _;\\n }\\n\\n modifier notProxy(address _account) {\\n require(_ownerOf[_account] == address(0), \\\"OpsProxyFactory: No proxy\\\");\\n _;\\n }\\n\\n constructor(address _ops) {\\n ops = _ops;\\n }\\n\\n function initialize(address _implementation) external initializer {\\n implementation = _implementation;\\n whitelistedImplementations[_implementation] = true;\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deploy() external override returns (address payable proxy) {\\n proxy = deployFor(msg.sender);\\n }\\n\\n function setImplementation(address _newImplementation)\\n external\\n onlyProxyAdmin\\n {\\n address oldImplementation = implementation;\\n require(\\n oldImplementation != _newImplementation &&\\n whitelistedImplementations[_newImplementation],\\n \\\"OpsProxyFactory: Invalid implementation\\\"\\n );\\n\\n implementation = _newImplementation;\\n\\n emit SetImplementation(oldImplementation, _newImplementation);\\n }\\n\\n function updateWhitelistedImplementations(\\n address _implementation,\\n bool _whitelist\\n ) external onlyProxyAdmin {\\n whitelistedImplementations[_implementation] = _whitelist;\\n\\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function getProxyOf(address _account)\\n external\\n view\\n override\\n returns (address, bool)\\n {\\n address proxyAddress = _proxyOf[_account];\\n\\n if (proxyAddress != address(0)) return (proxyAddress, true);\\n\\n proxyAddress = determineProxyAddress(_account);\\n return (proxyAddress, false);\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function ownerOf(address _proxy) external view override returns (address) {\\n return _ownerOf[_proxy];\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function deployFor(address owner)\\n public\\n override\\n onlyOneProxy(owner)\\n notProxy(owner)\\n returns (address payable proxy)\\n {\\n proxy = _deploy(bytes32(0), _getBytecode(owner));\\n\\n _proxyOf[owner] = proxy;\\n _ownerOf[proxy] = owner;\\n\\n emit DeployProxy(msg.sender, owner, address(proxy));\\n }\\n\\n ///@inheritdoc IOpsProxyFactory\\n function determineProxyAddress(address _account)\\n public\\n view\\n override\\n returns (address)\\n {\\n address proxyAddress = _proxyOf[_account];\\n if (proxyAddress != address(0)) return proxyAddress;\\n\\n bytes memory bytecode = _getBytecode(_account);\\n\\n bytes32 codeHash = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n bytes32(0),\\n keccak256(bytecode)\\n )\\n );\\n\\n return address(uint160(uint256(codeHash)));\\n }\\n\\n function _deploy(bytes32 _salt, bytes memory _bytecode)\\n internal\\n returns (address payable proxy)\\n {\\n assembly {\\n let endowment := 0\\n let bytecodeStart := add(_bytecode, 0x20)\\n let bytecodeLength := mload(_bytecode)\\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\\n }\\n }\\n\\n function _getBytecode(address _owner) internal view returns (bytes memory) {\\n return\\n abi.encodePacked(\\n type(EIP173OpsProxy).creationCode,\\n abi.encode(address(this), implementation, _owner, bytes(\\\"\\\"))\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf6c033ab42deffa5ef5c5161fe53fd8b07add3f2bb1d958d5bd93f95934dd4a0\",\"license\":\"UNLICENSED\"},\"contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nimport \\\"./Proxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../../../interfaces/IOpsProxyFactory.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n/**\\n * @notice Proxy implementing EIP173 for ownership management.\\n * @notice This is used for OpsProxy.\\n *\\n * @dev 1. custom receive can be set in implementation.\\n * @dev 2. transferProxyAdmin removed.\\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\\n */\\ncontract EIP173OpsProxy is Proxy {\\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\\n modifier onlyWhitelistedImplementation(address _implementation) {\\n require(\\n opsProxyFactory.whitelistedImplementations(_implementation),\\n \\\"Implementation not whitelisted\\\"\\n );\\n _;\\n }\\n\\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\\n receive() external payable override {\\n _fallback();\\n }\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address _opsProxyFactory,\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function upgradeTo(address newImplementation)\\n external\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n onlyWhitelistedImplementation(newImplementation)\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x1e31c6fcde4bc9000918f09bd3002cd347c8b65e2a1a9b69f63b9b9cf61643fe\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n}\\n\",\"keccak256\":\"0x428ced1961d42c505a3e49d90498f92f4b0df8537e5ffa59f14ba375d99150a1\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.12;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xb5e3e1c4cab8a5e3bd968f51c201a11e651f62b47aa78a4e3e0b7508be268d35\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200296e3803806200296e8339818101604052810190620000379190620000dc565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200010e565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b620000b68162000097565b8114620000c257600080fd5b50565b600081519050620000d681620000ab565b92915050565b600060208284031215620000f557620000f462000072565b5b60006200010584828501620000c5565b91505092915050565b6080516128446200012a6000396000610d2f01526128446000f3fe60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "deployedBytecode": "0x60806040523480156200001157600080fd5b5060043610620000b85760003560e01c8063775c300c116200007b578063775c300c14620001a1578063c4d66de814620001c3578063d784d42614620001e3578063ded89a7c1462000203578063e70abe92146200023a578063fcff48ed146200025c57620000b8565b806314afd79e14620000bd5780635c60da1b14620000f35780635c6c4bbe1462000115578063606aa715146200013557806374912cd2146200016b575b600080fd5b620000db6004803603810190620000d5919062000ef8565b62000292565b604051620000ea919062000f3b565b60405180910390f35b620000fd620002fb565b6040516200010c919062000f3b565b60405180910390f35b6200013360048036038101906200012d919062000f95565b62000321565b005b6200015360048036038101906200014d919062000ef8565b6200043c565b60405162000162919062000f3b565b60405180910390f35b62000189600480360381019062000183919062000ef8565b6200053f565b60405162000198919062001001565b60405180910390f35b620001ab62000874565b604051620001ba919062001001565b60405180910390f35b620001e16004803603810190620001db919062000ef8565b62000886565b005b620002016004803603810190620001fb919062000ef8565b62000a61565b005b6200022160048036038101906200021b919062000ef8565b62000c68565b604051620002319291906200102f565b60405180910390f35b6200024462000d2d565b60405162000253919062000f3b565b60405180910390f35b6200027a600480360381019062000274919062000ef8565b62000d51565b6040516200028991906200105c565b60405180910390f35b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6200032b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146200039b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200039290620010da565b60405180910390fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508015158273ffffffffffffffffffffffffffffffffffffffff167f0501828758a98b15fa5ef2b0f0100e2266e65c28175face06351ac414c14005f60405160405180910390a35050565b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614620004e057809150506200053a565b6000620004ed8462000d9a565b9050600060ff60f81b306000801b8480519060200120604051602001620005189493929190620011cc565b6040516020818303038152906040528051906020012090508060001c93505050505b919050565b600081600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161462000613576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200060a9062001272565b60405180910390fd5b82600073ffffffffffffffffffffffffffffffffffffffff16600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614620006e5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006dc90620012e4565b60405180910390fd5b620006fe6000801b620006f88662000d9a565b62000e44565b925082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f2d8895d948115783fa362a57339c4c179365fafeafdd7dca66364ae296f50b7560405160405180910390a45050919050565b600062000881336200053f565b905090565b60008060019054906101000a900460ff16159050808015620008b85750600160008054906101000a900460ff1660ff16105b80620008e95750620008ca3062000e5d565b158015620008e85750600160008054906101000a900460ff1660ff16145b5b6200092b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000922906200137c565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801562000969576001600060016101000a81548160ff0219169083151502179055505b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550801562000a5d5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405162000a549190620013f8565b60405180910390a15b5050565b62000a6b62000d71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161462000adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ad290620010da565b60405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801562000b875750600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b62000bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000bc0906200148b565b60405180910390fd5b81600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f273696cd8b7028587777b784decf945aca2e42036459d9d5fd81e493b112682860405160405180910390a35050565b6000806000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000d1257806001925092505062000d28565b62000d1d846200043c565b905080600092509250505b915091565b7f000000000000000000000000000000000000000000000000000000000000000081565b60016020528060005260406000206000915054906101000a900460ff1681565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60606040518060200162000dae9062000e80565b6020820181038252601f19601f8201166040525030600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518060200160405280600081525060405160200162000e0c949392919062001551565b60405160208183030381529060405260405160200162000e2e929190620015e7565b6040516020818303038152906040529050919050565b60008060208301835185818385f5935050505092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6111ff806200161083390190565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000ec08262000e93565b9050919050565b62000ed28162000eb3565b811462000ede57600080fd5b50565b60008135905062000ef28162000ec7565b92915050565b60006020828403121562000f115762000f1062000e8e565b5b600062000f218482850162000ee1565b91505092915050565b62000f358162000eb3565b82525050565b600060208201905062000f52600083018462000f2a565b92915050565b60008115159050919050565b62000f6f8162000f58565b811462000f7b57600080fd5b50565b60008135905062000f8f8162000f64565b92915050565b6000806040838503121562000faf5762000fae62000e8e565b5b600062000fbf8582860162000ee1565b925050602062000fd28582860162000f7e565b9150509250929050565b600062000fe98262000e93565b9050919050565b62000ffb8162000fdc565b82525050565b600060208201905062001018600083018462000ff0565b92915050565b620010298162000f58565b82525050565b600060408201905062001046600083018562000f2a565b6200105560208301846200101e565b9392505050565b60006020820190506200107360008301846200101e565b92915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000620010c2600e8362001079565b9150620010cf826200108a565b602082019050919050565b60006020820190508181036000830152620010f581620010b3565b9050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b620011476200114182620010fc565b62001128565b82525050565b60008160601b9050919050565b600062001167826200114d565b9050919050565b60006200117b826200115a565b9050919050565b62001197620011918262000eb3565b6200116e565b82525050565b6000819050919050565b6000819050919050565b620011c6620011c0826200119d565b620011a7565b82525050565b6000620011da828762001132565b600182019150620011ec828662001182565b601482019150620011fe8285620011b1565b602082019150620012108284620011b1565b60208201915081905095945050505050565b7f4f707350726f7879466163746f72793a204f6e652070726f7879000000000000600082015250565b60006200125a601a8362001079565b9150620012678262001222565b602082019050919050565b600060208201905081810360008301526200128d816200124b565b9050919050565b7f4f707350726f7879466163746f72793a204e6f2070726f787900000000000000600082015250565b6000620012cc60198362001079565b9150620012d98262001294565b602082019050919050565b60006020820190508181036000830152620012ff81620012bd565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b600062001364602e8362001079565b9150620013718262001306565b604082019050919050565b60006020820190508181036000830152620013978162001355565b9050919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000620013e0620013da620013d4846200139e565b620013b5565b620013a8565b9050919050565b620013f281620013bf565b82525050565b60006020820190506200140f6000830184620013e7565b92915050565b7f4f707350726f7879466163746f72793a20496e76616c696420696d706c656d6560008201527f6e746174696f6e00000000000000000000000000000000000000000000000000602082015250565b60006200147360278362001079565b9150620014808262001415565b604082019050919050565b60006020820190508181036000830152620014a68162001464565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620014e9578082015181840152602081019050620014cc565b83811115620014f9576000848401525b50505050565b6000601f19601f8301169050919050565b60006200151d82620014ad565b620015298185620014b8565b93506200153b818560208601620014c9565b6200154681620014ff565b840191505092915050565b600060808201905062001568600083018762000f2a565b62001577602083018662000f2a565b62001586604083018562000f2a565b81810360608301526200159a818462001510565b905095945050505050565b600081905092915050565b6000620015bd82620014ad565b620015c98185620015a5565b9350620015db818560208601620014c9565b80840191505092915050565b6000620015f58285620015b0565b9150620016038284620015b0565b9150819050939250505056fe60a0604052604051620011ff380380620011ff83398181016040528101906200002991906200047f565b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250506200006f83826200008a60201b60201c565b6200008082620001bf60201b60201c565b5050505062000576565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a3600082511115620001ba5760008373ffffffffffffffffffffffffffffffffffffffff16836040516200016191906200055d565b600060405180830381855af49150503d80600081146200019e576040519150601f19603f3d011682016040523d82523d6000602084013e620001a3565b606091505b5050905080620001b8573d806000803e806000fd5b505b505050565b6000620001d16200025460201b60201c565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002be8262000291565b9050919050565b620002d081620002b1565b8114620002dc57600080fd5b50565b600081519050620002f081620002c5565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200034b8262000300565b810181811067ffffffffffffffff821117156200036d576200036c62000311565b5b80604052505050565b6000620003826200027d565b905062000390828262000340565b919050565b600067ffffffffffffffff821115620003b357620003b262000311565b5b620003be8262000300565b9050602081019050919050565b60005b83811015620003eb578082015181840152602081019050620003ce565b83811115620003fb576000848401525b50505050565b600062000418620004128462000395565b62000376565b905082815260208101848484011115620004375762000436620002fb565b5b62000444848285620003cb565b509392505050565b600082601f830112620004645762000463620002f6565b5b81516200047684826020860162000401565b91505092915050565b600080600080608085870312156200049c576200049b62000287565b5b6000620004ac87828801620002df565b9450506020620004bf87828801620002df565b9350506040620004d287828801620002df565b925050606085015167ffffffffffffffff811115620004f657620004f56200028c565b5b62000504878288016200044c565b91505092959194509250565b600081519050919050565b600081905092915050565b6000620005338262000510565b6200053f81856200051b565b935062000551818560208601620003cb565b80840191505092915050565b60006200056b828462000526565b915081905092915050565b608051610c5f620005a060003960008181610351015281816104cc01526105f90152610c5f6000f3fe60806040526004361061004e5760003560e01c806301ffc9a7146100675780633659cfe6146100a45780633e47158c146100cd5780634f1ef286146100f8578063ba1d0ff4146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e600480360381019061008991906107d5565b610188565b60405161009b919061081d565b60405180910390f35b3480156100b057600080fd5b506100cb60048036038101906100c69190610896565b6102d9565b005b3480156100d957600080fd5b506100e2610445565b6040516100ef91906108d2565b60405180910390f35b610112600480360381019061010d9190610952565b610454565b005b34801561012057600080fd5b506101296105f7565b6040516101369190610a11565b60405180910390f35b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af43d806000803e816000811461018357816000f35b816000fd5b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806101e35750637f5828d060e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156101f157600190506102d4565b63ffffffff60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19160361022757600090506102d4565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7846040518263ffffffff1660e01b81526004016102869190610a3b565b602060405180830381865afa9250505080156102c057506040513d601f19601f820116820180604052508101906102bd9190610a82565b60015b6102ce5760009150506102d4565b80925050505b919050565b6102e161061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461034e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034590610b0c565b60405180910390fd5b807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b81526004016103a891906108d2565b602060405180830381865afa1580156103c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e99190610a82565b610428576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041f90610b78565b60405180910390fd5b6104418260405180602001604052806000815250610644565b5050565b600061044f61061b565b905090565b61045c61061b565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610b0c565b60405180910390fd5b827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fcff48ed826040518263ffffffff1660e01b815260040161052391906108d2565b602060405180830381865afa158015610540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105649190610a82565b6105a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059a90610b78565b60405180910390fd5b6105f18484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610644565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc549050827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc558273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829660405160405180910390a360008251111561076e5760008373ffffffffffffffffffffffffffffffffffffffff16836040516107189190610c12565b600060405180830381855af49150503d8060008114610753576040519150601f19603f3d011682016040523d82523d6000602084013e610758565b606091505b505090508061076c573d806000803e806000fd5b505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6107b28161077d565b81146107bd57600080fd5b50565b6000813590506107cf816107a9565b92915050565b6000602082840312156107eb576107ea610773565b5b60006107f9848285016107c0565b91505092915050565b60008115159050919050565b61081781610802565b82525050565b6000602082019050610832600083018461080e565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061086382610838565b9050919050565b61087381610858565b811461087e57600080fd5b50565b6000813590506108908161086a565b92915050565b6000602082840312156108ac576108ab610773565b5b60006108ba84828501610881565b91505092915050565b6108cc81610858565b82525050565b60006020820190506108e760008301846108c3565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610912576109116108ed565b5b8235905067ffffffffffffffff81111561092f5761092e6108f2565b5b60208301915083600182028301111561094b5761094a6108f7565b5b9250929050565b60008060006040848603121561096b5761096a610773565b5b600061097986828701610881565b935050602084013567ffffffffffffffff81111561099a57610999610778565b5b6109a6868287016108fc565b92509250509250925092565b6000819050919050565b60006109d76109d26109cd84610838565b6109b2565b610838565b9050919050565b60006109e9826109bc565b9050919050565b60006109fb826109de565b9050919050565b610a0b816109f0565b82525050565b6000602082019050610a266000830184610a02565b92915050565b610a358161077d565b82525050565b6000602082019050610a506000830184610a2c565b92915050565b610a5f81610802565b8114610a6a57600080fd5b50565b600081519050610a7c81610a56565b92915050565b600060208284031215610a9857610a97610773565b5b6000610aa684828501610a6d565b91505092915050565b600082825260208201905092915050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000610af6600e83610aaf565b9150610b0182610ac0565b602082019050919050565b60006020820190508181036000830152610b2581610ae9565b9050919050565b7f496d706c656d656e746174696f6e206e6f742077686974656c69737465640000600082015250565b6000610b62601e83610aaf565b9150610b6d82610b2c565b602082019050919050565b60006020820190508181036000830152610b9181610b55565b9050919050565b600081519050919050565b600081905092915050565b60005b83811015610bcc578082015181840152602081019050610bb1565b83811115610bdb576000848401525b50505050565b6000610bec82610b98565b610bf68185610ba3565b9350610c06818560208601610bae565b80840191505092915050565b6000610c1e8284610be1565b91508190509291505056fea2646970667358221220e1383b8d53f44c0189f6040dcd0147a80a9b144d114d866a2dad68295018327864736f6c634300080e0033a26469706673582212208990fd71e75c1dd809041d119eeb16b6688f06d581881195f9cf80f0d95bd18164736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "deploy()": { + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "deployFor(address)": { + "params": { + "owner": "Address to deploy the proxy for." + }, + "returns": { + "proxy": "Address of deployed proxy." + } + }, + "determineProxyAddress(address)": { + "params": { + "account": "Address to determine the proxy address for." + } + }, + "getProxyOf(address)": { + "returns": { + "_0": "address Proxy address owned by account.", + "_1": "bool Whether if proxy is deployed" + } + }, + "ownerOf(address)": { + "returns": { + "_0": "address Owner of deployed proxy." + } + } + }, + "stateVariables": { + "_ownerOf": { + "details": "track owner of proxy" + }, + "_proxyOf": { + "details": "track proxy of user" + }, + "whitelistedImplementations": { + "return": "bool Whether if implementation is whitelisted.", + "returns": { + "_0": "bool Whether if implementation is whitelisted." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "DeployProxy(address,address,address)": { + "notice": "Emitted when an OpsProxy is deployed." + }, + "SetImplementation(address,address)": { + "notice": "Emitted when OpsProxy implementation to be deployed is changed." + }, + "UpdateWhitelistedImplementation(address,bool)": { + "notice": "Emitted when OpsProxy implementation is added or removed from whitelist." + } + }, + "kind": "user", + "methods": { + "deploy()": { + "notice": "Deploys OpsProxy for the msg.sender." + }, + "deployFor(address)": { + "notice": "Deploys OpsProxy for another address." + }, + "determineProxyAddress(address)": { + "notice": "Determines the OpsProxy address when it is not deployed." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 6, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 9, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7084, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "implementation", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7089, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "whitelistedImplementations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 7094, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_proxyOf", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 7099, + "contract": "contracts/opsProxy/OpsProxyFactory.sol:OpsProxyFactory", + "label": "_ownerOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/OpsProxyFactory_Proxy.json b/deployments/cornmaizenet/OpsProxyFactory_Proxy.json new file mode 100644 index 0000000..6dff41c --- /dev/null +++ b/deployments/cornmaizenet/OpsProxyFactory_Proxy.json @@ -0,0 +1,218 @@ +{ + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "ProxyImplementationUpdated", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "id", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "623884", + "logsBloom": "0x000000000400000000000000000000000000000000000000008000000000000001000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000200000000000000000008000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000a0002000000000000000000400000000000010000000000000000000000000000000", + "blockHash": "0x941330f51cb1a52b9ec62d091bbd70410b8a0e98dacbbe6b923e7be934c58110", + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 61000, + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007ad7b5f4f0e5df7d6aa5444516429af77babc3a0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x941330f51cb1a52b9ec62d091bbd70410b8a0e98dacbbe6b923e7be934c58110" + }, + { + "transactionIndex": 1, + "blockNumber": 61000, + "transactionHash": "0x81c6fdb2ddfb73739e2358cded44bd98640c3acb00cdc4cf26849974e23b615a", + "address": "0x0C9382483D356e394409CC201Dc26dE8b85c01FC", + "topics": [ + "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x941330f51cb1a52b9ec62d091bbd70410b8a0e98dacbbe6b923e7be934c58110" + } + ], + "blockNumber": 61000, + "cumulativeGasUsed": "623884", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "4a46ee6c1a29be400c9fab1ecc28e172", + "metadata": "{\"compiler\":{\"version\":\"0.8.10+commit.fc410830\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address ownerAddress,\\n bytes memory data\\n ) payable {\\n _setOwner(ownerAddress);\\n _setImplementation(implementationAddress, data);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function owner() external view returns (address) {\\n return _owner();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferOwnership(address newOwner) external onlyOwner {\\n _setOwner(newOwner);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyOwner {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyOwner() {\\n require(msg.sender == _owner(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _owner() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n\\n function _setOwner(address newOwner) internal {\\n address previousOwner = _owner();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\\n }\\n emit OwnershipTransferred(previousOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa52a027d9e3ad599c98da343572c0f8e16d65551d6fa0ab218e9e2d0f76e2ab0\",\"license\":\"MIT\"},\"solc_0.8/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data) internal {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\\n }\\n\\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x68c8cf1a340a53d31de8ed808bb66d64e83d50b20d80a0b2dff6aba903cebc98\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000ccc38038062000ccc8339810160408190526200002691620001fc565b620000318262000046565b6200003d8382620000b8565b505050620002fa565b60006200006060008051602062000cac8339815191525490565b90508160008051602062000cac83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511562000195576000836001600160a01b0316836040516200013c9190620002dc565b600060405180830381855af49150503d806000811462000179576040519150601f19603f3d011682016040523d82523d6000602084013e6200017e565b606091505b505090508062000193573d806000803e806000fd5b505b505050565b80516001600160a01b0381168114620001b257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620001ea578181015183820152602001620001d0565b83811115620001935750506000910152565b6000806000606084860312156200021257600080fd5b6200021d846200019a565b92506200022d602085016200019a565b60408501519092506001600160401b03808211156200024b57600080fd5b818601915086601f8301126200026057600080fd5b815181811115620002755762000275620001b7565b604051601f8201601f19908116603f01168101908382118183101715620002a057620002a0620001b7565b81604052828152896020848701011115620002ba57600080fd5b620002cd836020830160208801620001cd565b80955050505050509250925092565b60008251620002f0818460208701620001cd565b9190910192915050565b6109a2806200030a6000396000f3fe60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", + "deployedBytecode": "0x60806040526004361061005e5760003560e01c80634f1ef286116100435780634f1ef286146101295780638da5cb5b1461013c578063f2fde38b14610176576100ca565b806301ffc9a7146100d45780633659cfe614610109576100ca565b366100ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f45544845525f52454a454354454400000000000000000000000000000000000060448201526064015b60405180910390fd5b6100d2610196565b005b3480156100e057600080fd5b506100f46100ef366004610806565b6101e1565b60405190151581526020015b60405180910390f35b34801561011557600080fd5b506100d2610124366004610871565b6103af565b6100d261013736600461088c565b610481565b34801561014857600080fd5b5061015161057c565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610100565b34801561018257600080fd5b506100d2610191366004610871565b6105ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460003681823780813683855af491503d8082833e8280156101d7578183f35b8183fd5b50505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061027457507f7f5828d0000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b1561028157506001919050565b7fffffffff0000000000000000000000000000000000000000000000000000000080831614156102b357506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008416600482015273ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa92505050801561039b575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526103989181019061090f565b60015b6103a85750600092915050565b9392505050565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e816040518060200160405280600081525061066a565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610537576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b6105778383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066a92505050565b505050565b60006105a67fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a454400000000000000000000000000000000000060448201526064016100c1565b61047e81610759565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80549083905560405173ffffffffffffffffffffffffffffffffffffffff80851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a38151156105775760008373ffffffffffffffffffffffffffffffffffffffff16836040516107059190610931565b600060405180830381855af49150503d8060008114610740576040519150601f19603f3d011682016040523d82523d6000602084013e610745565b606091505b50509050806101db573d806000803e806000fd5b60006107837fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b9050817fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103558173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561081857600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146103a857600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b919050565b60006020828403121561088357600080fd5b6103a882610848565b6000806000604084860312156108a157600080fd5b6108aa84610848565b9250602084013567ffffffffffffffff808211156108c757600080fd5b818601915086601f8301126108db57600080fd5b8135818111156108ea57600080fd5b8760208285010111156108fc57600080fd5b6020830194508093505050509250925092565b60006020828403121561092157600080fd5b815180151581146103a857600080fd5b6000825160005b818110156109525760208186018101518583015201610938565b81811115610961576000828501525b50919091019291505056fea2646970667358221220e649c37c69d6249070369be01f33af3368fcdcea9814421a048306c2829c125964736f6c634300080a0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Proxy implementing EIP173 for ownership management", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/ProxyModule.json b/deployments/cornmaizenet/ProxyModule.json new file mode 100644 index 0000000..3197cbf --- /dev/null +++ b/deployments/cornmaizenet/ProxyModule.json @@ -0,0 +1,607 @@ +{ + "address": "0xc93479a69a60BC45b7D18A175bA644601eEf623e", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7922ec7c2e58908d98fc50e920e25a609b822d643502694fffd000e86f43d5c5", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1141739", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x507a1d4c86db2fcacdca57858a84084ad8a568eced6c80174289501b3bbf4d1c", + "transactionHash": "0x7922ec7c2e58908d98fc50e920e25a609b822d643502694fffd000e86f43d5c5", + "logs": [], + "blockNumber": 61002, + "cumulativeGasUsed": "1141739", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0C9382483D356e394409CC201Dc26dE8b85c01FC" + ], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"_taskCreator cannot create task to other user's proxy\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"details\":\"_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"execData\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ProxyModule.sol\":\"ProxyModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IOpsProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxy {\\n /**\\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\\n *\\n * @param target Address of contract that is called\\n * @param data Data used in the call.\\n * @param value Native token value used in the call.\\n * @param returnData Data returned by the call.\\n */\\n event ExecuteCall(\\n address indexed target,\\n bytes data,\\n uint256 value,\\n bytes returnData\\n );\\n\\n /**\\n * @notice Multicall to different contracts with different datas.\\n *\\n * @param targets Addresses of contracts to be called.\\n * @param datas Datas for each contract call.\\n * @param values Native token value for each contract call.\\n */\\n function batchExecuteCall(\\n address[] calldata targets,\\n bytes[] calldata datas,\\n uint256[] calldata values\\n ) external payable;\\n\\n /**\\n * @notice Call to a single contract.\\n *\\n * @param target Address of contracts to be called.\\n * @param data Data for contract call.\\n * @param value Native token value for contract call.\\n */\\n function executeCall(\\n address target,\\n bytes calldata data,\\n uint256 value\\n ) external payable;\\n\\n /**\\n * @return address Ops smart contract address\\n */\\n function ops() external view returns (address);\\n\\n /**\\n * @return address Owner of the proxy\\n */\\n function owner() external view returns (address);\\n\\n /**\\n * @return uint256 version of OpsProxy.\\n */\\n function version() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1b6e349287dfeb2735da8d3f7ae0aa5865996f7dd58622773b449a76bcaf881a\",\"license\":\"MIT\"},\"contracts/interfaces/IOpsProxyFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @notice Emitted when an OpsProxy is deployed.\\n *\\n * @param deployer Address which initiated the deployment\\n * @param owner The address which the proxy is for.\\n * @param proxy Address of deployed proxy.\\n */\\n event DeployProxy(\\n address indexed deployer,\\n address indexed owner,\\n address indexed proxy\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\\n *\\n * @param oldImplementation Previous OpsProxy implementation.\\n * @param newImplementation Current OpsProxy implementation.\\n */\\n event SetImplementation(\\n address indexed oldImplementation,\\n address indexed newImplementation\\n );\\n\\n /**\\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelisted Added or removed from whitelist.\\n */\\n event UpdateWhitelistedImplementation(\\n address indexed implementation,\\n bool indexed whitelisted\\n );\\n\\n /**\\n * @notice Deploys OpsProxy for the msg.sender.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deploy() external returns (address payable proxy);\\n\\n /**\\n * @notice Deploys OpsProxy for another address.\\n *\\n * @param owner Address to deploy the proxy for.\\n *\\n * @return proxy Address of deployed proxy.\\n */\\n function deployFor(address owner) external returns (address payable proxy);\\n\\n /**\\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\\n *\\n * @param newImplementation New implementation to be set.\\n */\\n function setImplementation(address newImplementation) external;\\n\\n /**\\n * @notice Add or remove OpsProxy implementation from the whitelist.\\n *\\n * @param implementation OpsProxy implementation.\\n * @param whitelist Added or removed from whitelist.\\n */\\n function updateWhitelistedImplementations(\\n address implementation,\\n bool whitelist\\n ) external;\\n\\n /**\\n * @notice Determines the OpsProxy address when it is not deployed.\\n *\\n * @param account Address to determine the proxy address for.\\n */\\n function determineProxyAddress(address account)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n\\n /**\\n * @return address Owner of deployed proxy.\\n */\\n function ownerOf(address proxy) external view returns (address);\\n\\n /**\\n * @return bool Whether if implementation is whitelisted.\\n */\\n function whitelistedImplementations(address implementation)\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xf4852a06be6f35a0671cf951f455fb9a58320c0908914c3ab9e62f9d27affe2b\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ProxyModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {IOpsProxy} from \\\"../interfaces/IOpsProxy.sol\\\";\\nimport {IOpsProxyFactory} from \\\"../interfaces/IOpsProxyFactory.sol\\\";\\n\\ncontract ProxyModule is TaskModuleBase {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n */\\n function onCreateTask(\\n bytes32,\\n address _taskCreator,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external override {\\n _deployIfNoProxy(_taskCreator);\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _taskCreator cannot create task to other user's proxy\\n */\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n view\\n override\\n returns (address, address)\\n {\\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\\n\\n if (ownerOfExecAddress != address(0)) {\\n // creating task to proxy\\n require(\\n _taskCreator == ownerOfExecAddress ||\\n _taskCreator == _execAddress,\\n \\\"ProxyModule: Only owner of proxy\\\"\\n );\\n\\n return (ownerOfExecAddress, _execAddress);\\n } else {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n // creating task to non proxy, with proxy\\n // give task ownership to proxy owner\\n return (ownerOfTaskCreator, _execAddress);\\n }\\n\\n // creating task to non proxy, without proxy\\n return (_taskCreator, _execAddress);\\n }\\n }\\n\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n view\\n override\\n returns (address)\\n {\\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\\n\\n if (ownerOfTaskCreator != address(0)) {\\n return ownerOfTaskCreator;\\n }\\n\\n return _taskCreator;\\n }\\n\\n /**\\n * @inheritdoc TaskModuleBase\\n * @dev _execData is encoded with proxy's `executeCall` function\\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\\n * with `executeCall` or `batchExecuteCall`.\\n */\\n function preExecCall(\\n bytes32,\\n address _taskCreator,\\n address _execAddress,\\n bytes calldata _execData\\n ) external view override returns (address, bytes memory execData) {\\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\\n\\n execData = _execAddress == proxy\\n ? _execData\\n : _encodeWithOpsProxy(_execAddress, _execData);\\n\\n _execAddress = proxy;\\n\\n return (_execAddress, execData);\\n }\\n\\n function _deployIfNoProxy(address _taskCreator) private {\\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\\n address(0);\\n\\n if (!isTaskCreatorProxy) {\\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\\n }\\n }\\n\\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\\n private\\n pure\\n returns (bytes memory)\\n {\\n return\\n abi.encodeWithSelector(\\n IOpsProxy.executeCall.selector,\\n _execAddress,\\n _execData,\\n 0\\n );\\n }\\n}\\n\",\"keccak256\":\"0xe681a040fb7054876217145013a02ba86e73aaf06ec69940a0a7ce80a9c6a657\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001508380380620015088339818101604052810190620000379190620000f0565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000122565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a48262000077565b9050919050565b6000620000b88262000097565b9050919050565b620000ca81620000ab565b8114620000d657600080fd5b50565b600081519050620000ea81620000bf565b92915050565b60006020828403121562000109576200010862000072565b5b60006200011984828501620000d9565b91505092915050565b6080516113996200016f600039600081816102ee01528181610463015281816105e50152818161075f0152818161078901528181610913015281816109ce0152610a6f01526113996000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b0ccbdf01161008c578063ba1d0ff411610066578063ba1d0ff41461024c578063c10304f71461026a578063cd3d4fb91461029b578063ddca3f43146102cb576100cf565b8063b0ccbdf0146101e3578063b2db0b41146101ff578063b81cd8661461021b576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636d2dd29f1461015257806376474e6a14610182578063ac21631a146101b3575b600080fd5b6100ee60048036038101906100e99190610c37565b6102e9565b6040516100fb9190610c86565b60405180910390f35b61011e60048036038101906101199190610ca1565b6103d0565b60405161012b9190610c86565b60405180910390f35b61013c610403565b6040516101499190610c86565b60405180910390f35b61016c60048036038101906101679190610ca1565b610429565b6040516101799190610c86565b60405180910390f35b61019c60048036038101906101979190610cce565b61045c565b6040516101aa929190610d0e565b60405180910390f35b6101cd60048036038101906101c89190610ca1565b6106d0565b6040516101da9190610d50565b60405180910390f35b6101fd60048036038101906101f89190610dd0565b6106e8565b005b61021960048036038101906102149190610e8c565b6106fa565b005b61023560048036038101906102309190610ca1565b610701565b604051610243929190610f3f565b60405180910390f35b61025461075d565b6040516102619190610fc7565b60405180910390f35b610284600480360381019061027f9190610e8c565b610781565b60405161029292919061107b565b60405180910390f35b6102b560048036038101906102b091906110d0565b6108bf565b6040516102c29190610c86565b60405180910390f35b6102d36108f2565b6040516102e09190610d50565b60405180910390f35b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b81526004016103459190610c86565b602060405180830381865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146103c557809150506103ca565b829150505b92915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e856040518263ffffffff1660e01b81526004016104ba9190610c86565b602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105e1578073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061059657508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b6105d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105cc9061119c565b60405180910390fd5b808492509250506106c9565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e876040518263ffffffff1660e01b815260040161063c9190610c86565b602060405180830381865afa158015610659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067d9190611112565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106c05780859350935050506106c9565b85859350935050505b9250929050565b60076020528060005260406000206000915090505481565b6106f1866108f8565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c886040518263ffffffff1660e01b81526004016107e09190610c86565b6040805180830381865afa1580156107fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082091906111f4565b5090508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161461086657610861868686610b11565b6108ac565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050505b9150809550859250509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166314afd79e846040518263ffffffff1660e01b815260040161096a9190610c86565b602060405180830381865afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ab9190611112565b73ffffffffffffffffffffffffffffffffffffffff161415905080610b0d5760007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ded89a7c846040518263ffffffff1660e01b8152600401610a259190610c86565b6040805180830381865afa158015610a41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6591906111f4565b91505080610b0b577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166374912cd2846040518263ffffffff1660e01b8152600401610ac69190610c86565b6020604051808303816000875af1158015610ae5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b099190611272565b505b505b5050565b60606354132d7860e01b8484846000604051602401610b339493929190611323565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b600080fd5b600080fd5b6000819050919050565b610bb681610ba3565b8114610bc157600080fd5b50565b600081359050610bd381610bad565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c0482610bd9565b9050919050565b610c1481610bf9565b8114610c1f57600080fd5b50565b600081359050610c3181610c0b565b92915050565b60008060408385031215610c4e57610c4d610b99565b5b6000610c5c85828601610bc4565b9250506020610c6d85828601610c22565b9150509250929050565b610c8081610bf9565b82525050565b6000602082019050610c9b6000830184610c77565b92915050565b600060208284031215610cb757610cb6610b99565b5b6000610cc584828501610bc4565b91505092915050565b60008060408385031215610ce557610ce4610b99565b5b6000610cf385828601610c22565b9250506020610d0485828601610c22565b9150509250929050565b6000604082019050610d236000830185610c77565b610d306020830184610c77565b9392505050565b6000819050919050565b610d4a81610d37565b82525050565b6000602082019050610d656000830184610d41565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112610d9057610d8f610d6b565b5b8235905067ffffffffffffffff811115610dad57610dac610d70565b5b602083019150836001820283011115610dc957610dc8610d75565b5b9250929050565b600080600080600080600060a0888a031215610def57610dee610b99565b5b6000610dfd8a828b01610bc4565b9750506020610e0e8a828b01610c22565b9650506040610e1f8a828b01610c22565b955050606088013567ffffffffffffffff811115610e4057610e3f610b9e565b5b610e4c8a828b01610d7a565b9450945050608088013567ffffffffffffffff811115610e6f57610e6e610b9e565b5b610e7b8a828b01610d7a565b925092505092959891949750929550565b600080600080600060808688031215610ea857610ea7610b99565b5b6000610eb688828901610bc4565b9550506020610ec788828901610c22565b9450506040610ed888828901610c22565b935050606086013567ffffffffffffffff811115610ef957610ef8610b9e565b5b610f0588828901610d7a565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610f3981610f14565b82525050565b6000604082019050610f546000830185610f30565b610f616020830184610f30565b9392505050565b6000819050919050565b6000610f8d610f88610f8384610bd9565b610f68565b610bd9565b9050919050565b6000610f9f82610f72565b9050919050565b6000610fb182610f94565b9050919050565b610fc181610fa6565b82525050565b6000602082019050610fdc6000830184610fb8565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561101c578082015181840152602081019050611001565b8381111561102b576000848401525b50505050565b6000601f19601f8301169050919050565b600061104d82610fe2565b6110578185610fed565b9350611067818560208601610ffe565b61107081611031565b840191505092915050565b60006040820190506110906000830185610c77565b81810360208301526110a28184611042565b90509392505050565b600681106110b857600080fd5b50565b6000813590506110ca816110ab565b92915050565b6000602082840312156110e6576110e5610b99565b5b60006110f4848285016110bb565b91505092915050565b60008151905061110c81610c0b565b92915050565b60006020828403121561112857611127610b99565b5b6000611136848285016110fd565b91505092915050565b600082825260208201905092915050565b7f50726f78794d6f64756c653a204f6e6c79206f776e6572206f662070726f7879600082015250565b600061118660208361113f565b915061119182611150565b602082019050919050565b600060208201905081810360008301526111b581611179565b9050919050565b60008115159050919050565b6111d1816111bc565b81146111dc57600080fd5b50565b6000815190506111ee816111c8565b92915050565b6000806040838503121561120b5761120a610b99565b5b6000611219858286016110fd565b925050602061122a858286016111df565b9150509250929050565b600061123f82610bd9565b9050919050565b61124f81611234565b811461125a57600080fd5b50565b60008151905061126c81611246565b92915050565b60006020828403121561128857611287610b99565b5b60006112968482850161125d565b91505092915050565b82818337600083830152505050565b60006112ba8385610fed565b93506112c783858461129f565b6112d083611031565b840190509392505050565b6000819050919050565b600060ff82169050919050565b600061130d611308611303846112db565b610f68565b6112e5565b9050919050565b61131d816112f2565b82525050565b60006060820190506113386000830187610c77565b818103602083015261134b8185876112ae565b905061135a6040830184611314565b9594505050505056fea2646970667358221220a0a63e88157755ed6529825292484ac49f91a07bfda16dce717e647d91857bc564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "_taskCreator cannot create task to other user's proxy", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "details": "_execData is encoded with proxy's `executeCall` function unless _execAddress is OpsProxy which assumes that _execData is encoded with `executeCall` or `batchExecuteCall`.", + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "execData": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ProxyModule.sol:ProxyModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/ResolverModule.json b/deployments/cornmaizenet/ResolverModule.json new file mode 100644 index 0000000..1b2f401 --- /dev/null +++ b/deployments/cornmaizenet/ResolverModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x726c864396D0E85E36D14308E3bE72829406E413", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolverAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_resolverData", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0526b732b4085c26912df1999ef64a60e9d08928bdf0659f67dbe4bdf339faa6", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "662008", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe2a477a7155c9cdc39f0bb934fb143ad2d76478b8666ddc01650387fe03b698f", + "transactionHash": "0x0526b732b4085c26912df1999ef64a60e9d08928bdf0659f67dbe4bdf339faa6", + "logs": [], + "blockNumber": 61004, + "cumulativeGasUsed": "662008", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_resolverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_resolverData\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"params\":{\"_resolverAddress\":\"Address of resolver.\",\"_resolverData\":\"Data passed to resolver.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(address,bytes)\":{\"notice\":\"Helper function to encode arguments for ResolverModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/ResolverModule.sol\":\"ResolverModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/ResolverModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\n\\ncontract ResolverModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for ResolverModule.\\n *\\n * @param _resolverAddress Address of resolver.\\n * @param _resolverData Data passed to resolver.\\n */\\n function encodeModuleArg(\\n address _resolverAddress,\\n bytes calldata _resolverData\\n ) external pure returns (bytes memory) {\\n return abi.encode(_resolverAddress, _resolverData);\\n }\\n}\\n\",\"keccak256\":\"0xf85ee11d33e6e157bc5fca9dd18ff816ca828855858dc3f14dd8f9d1736421a6\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610afc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd0146101045780633c706c6f14610134578063647846a5146101645780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e9919061058a565b6102fb565b6040516100fb91906105d9565b60405180910390f35b61011e600480360381019061011991906105f4565b610306565b60405161012b91906105d9565b60405180910390f35b61014e60048036038101906101499190610686565b610339565b60405161015b919061077f565b60405180910390f35b61016c610368565b60405161017991906105d9565b60405180910390f35b61019c600480360381019061019791906105f4565b61038e565b6040516101a991906105d9565b60405180910390f35b6101cc60048036038101906101c791906107a1565b6103c1565b6040516101da9291906107e1565b60405180910390f35b6101fd60048036038101906101f891906105f4565b6103d1565b60405161020a9190610823565b60405180910390f35b61022d6004803603810190610228919061083e565b6103e9565b005b610249600480360381019061024491906108fa565b6103f2565b005b610265600480360381019061026091906105f4565b6103f9565b6040516102739291906109ad565b60405180910390f35b610296600480360381019061029191906108fa565b610455565b6040516102a49291906109d6565b60405180910390f35b6102c760048036038101906102c29190610a2b565b6104b3565b6040516102d491906105d9565b60405180910390f35b6102e56104e6565b6040516102f29190610823565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161035093929190610a94565b60405160208183030381529060405290509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600080fd5b600080fd5b6000819050919050565b610509816104f6565b811461051457600080fd5b50565b60008135905061052681610500565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105578261052c565b9050919050565b6105678161054c565b811461057257600080fd5b50565b6000813590506105848161055e565b92915050565b600080604083850312156105a1576105a06104ec565b5b60006105af85828601610517565b92505060206105c085828601610575565b9150509250929050565b6105d38161054c565b82525050565b60006020820190506105ee60008301846105ca565b92915050565b60006020828403121561060a576106096104ec565b5b600061061884828501610517565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261064657610645610621565b5b8235905067ffffffffffffffff81111561066357610662610626565b5b60208301915083600182028301111561067f5761067e61062b565b5b9250929050565b60008060006040848603121561069f5761069e6104ec565b5b60006106ad86828701610575565b935050602084013567ffffffffffffffff8111156106ce576106cd6104f1565b5b6106da86828701610630565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610720578082015181840152602081019050610705565b8381111561072f576000848401525b50505050565b6000601f19601f8301169050919050565b6000610751826106e6565b61075b81856106f1565b935061076b818560208601610702565b61077481610735565b840191505092915050565b600060208201905081810360008301526107998184610746565b905092915050565b600080604083850312156107b8576107b76104ec565b5b60006107c685828601610575565b92505060206107d785828601610575565b9150509250929050565b60006040820190506107f660008301856105ca565b61080360208301846105ca565b9392505050565b6000819050919050565b61081d8161080a565b82525050565b60006020820190506108386000830184610814565b92915050565b600080600080600080600060a0888a03121561085d5761085c6104ec565b5b600061086b8a828b01610517565b975050602061087c8a828b01610575565b965050604061088d8a828b01610575565b955050606088013567ffffffffffffffff8111156108ae576108ad6104f1565b5b6108ba8a828b01610630565b9450945050608088013567ffffffffffffffff8111156108dd576108dc6104f1565b5b6108e98a828b01610630565b925092505092959891949750929550565b600080600080600060808688031215610916576109156104ec565b5b600061092488828901610517565b955050602061093588828901610575565b945050604061094688828901610575565b935050606086013567ffffffffffffffff811115610967576109666104f1565b5b61097388828901610630565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109a781610982565b82525050565b60006040820190506109c2600083018561099e565b6109cf602083018461099e565b9392505050565b60006040820190506109eb60008301856105ca565b81810360208301526109fd8184610746565b90509392505050565b60068110610a1357600080fd5b50565b600081359050610a2581610a06565b92915050565b600060208284031215610a4157610a406104ec565b5b6000610a4f84828501610a16565b91505092915050565b82818337600083830152505050565b6000610a7383856106f1565b9350610a80838584610a58565b610a8983610735565b840190509392505050565b6000604082019050610aa960008301866105ca565b8181036020830152610abc818486610a67565b905094935050505056fea2646970667358221220b4ed33110249e070e4ae06749ba239bfda1978e4ce04190e826c34372089bfed64736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(address,bytes)": { + "params": { + "_resolverAddress": "Address of resolver.", + "_resolverData": "Data passed to resolver." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(address,bytes)": { + "notice": "Helper function to encode arguments for ResolverModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/ResolverModule.sol:ResolverModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/SingleExecModule.json b/deployments/cornmaizenet/SingleExecModule.json new file mode 100644 index 0000000..24699c5 --- /dev/null +++ b/deployments/cornmaizenet/SingleExecModule.json @@ -0,0 +1,580 @@ +{ + "address": "0x21de3EaCd23d123caB00b36EC334A838B6f5f4a2", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xd2c27710eb9ca7907d9d9158d3a92094406851799e6ffcbbba00f1bdd346d71a", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "731092", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa681e77ace5c0d604761a3c4532bc9a76bee1c503eb2947d4948969a4f07215c", + "transactionHash": "0xd2c27710eb9ca7907d9d9158d3a92094406851799e6ffcbbba00f1bdd346d71a", + "logs": [], + "blockNumber": 61005, + "cumulativeGasUsed": "731092", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/SingleExecModule.sol\":\"SingleExecModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/libraries/LibEvents.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\nimport {LibDataTypes} from \\\"./LibDataTypes.sol\\\";\\n\\nlibrary LibEvents {\\n /**\\n * @notice Emitted when `createTask` is called.\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that is called by Gelato.\\n * @param execDataOrSelector Execution data / function selector.\\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n */\\n event TaskCreated(\\n address indexed taskCreator,\\n address indexed execAddress,\\n bytes execDataOrSelector,\\n LibDataTypes.ModuleData moduleData,\\n address feeToken,\\n bytes32 indexed taskId\\n );\\n\\n /**\\n * @notice Emitted when `cancelTask` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param taskCreator The address which owned the task.\\n */\\n event TaskCancelled(bytes32 taskId, address taskCreator);\\n\\n /**\\n * @notice Emitted when `exec` is called.\\n *\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param execAddress Address of contract that will be called by Gelato.\\n * @param execData Execution data / function selector.\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecSuccess(\\n uint256 indexed txFee,\\n address indexed feeToken,\\n address indexed execAddress,\\n bytes execData,\\n bytes32 taskId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModule` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param correlationId Id of the execution to be used for 1Balance settlement.\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSuccess(\\n bytes32 taskId,\\n bytes32 correlationId,\\n bool callSuccess\\n );\\n\\n /**\\n * @notice Emitted when `execBypassModuleSyncFee` is called.\\n *\\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\\n * @param txFee Fee paid to Gelato for execution\\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\\n * @param callSuccess Status of the call to execAddress.\\n */\\n event ExecBypassModuleSyncFeeSuccess(\\n bytes32 taskId,\\n uint256 txFee,\\n address feeToken,\\n bool callSuccess\\n );\\n}\\n\",\"keccak256\":\"0x0842beedaddcfe70d7a17591e387e2e6dbad8e62530202d66978ebfd97445349\",\"license\":\"MIT\"},\"contracts/taskModules/SingleExecModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibEvents} from \\\"../libraries/LibEvents.sol\\\";\\n\\ncontract SingleExecModule is TaskModuleBase {\\n using EnumerableSet for EnumerableSet.Bytes32Set;\\n\\n /// @inheritdoc TaskModuleBase\\n function postExecCall(\\n bytes32 _taskId,\\n address _taskCreator,\\n address,\\n bytes calldata\\n ) external override {\\n _createdTasks[_taskCreator].remove(_taskId);\\n\\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\\n }\\n}\\n\",\"keccak256\":\"0x4e44b8e0a0489daa72cc13b4712d29c65abec3912aca010960fc59e24f295bac\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c41806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b0ccbdf011610071578063b0ccbdf0146101c8578063b2db0b41146101e4578063b81cd86614610200578063c10304f714610231578063cd3d4fb914610262578063ddca3f4314610292576100b4565b806314ae9926146100b95780632e6e0bd0146100e9578063647846a5146101195780636d2dd29f1461013757806376474e6a14610167578063ac21631a14610198575b600080fd5b6100d360048036038101906100ce91906106c6565b6102b0565b6040516100e09190610715565b60405180910390f35b61010360048036038101906100fe9190610730565b6102bb565b6040516101109190610715565b60405180910390f35b6101216102ee565b60405161012e9190610715565b60405180910390f35b610151600480360381019061014c9190610730565b610314565b60405161015e9190610715565b60405180910390f35b610181600480360381019061017c919061075d565b610347565b60405161018f92919061079d565b60405180910390f35b6101b260048036038101906101ad9190610730565b610357565b6040516101bf91906107df565b60405180910390f35b6101e260048036038101906101dd919061085f565b61036f565b005b6101fe60048036038101906101f9919061091b565b610378565b005b61021a60048036038101906102159190610730565b61040a565b6040516102289291906109ce565b60405180910390f35b61024b6004803603810190610246919061091b565b610466565b604051610259929190610a90565b60405180910390f35b61027c60048036038101906102779190610ae5565b6104c4565b6040516102899190610715565b60405180910390f35b61029a6104f7565b6040516102a791906107df565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b6103c985600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206104fd90919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0985856040516103fb929190610b21565b60405180910390a15050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600061050c8360000183610514565b905092915050565b6000808360010160008481526020019081526020016000205490506000811461061c5760006001826105469190610b79565b905060006001866000018054905061055e9190610b79565b90508181146105cd57600086600001828154811061057f5761057e610bad565b5b90600052602060002001549050808760000184815481106105a3576105a2610bad565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806105e1576105e0610bdc565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610622565b60009150505b92915050565b600080fd5b600080fd5b6000819050919050565b61064581610632565b811461065057600080fd5b50565b6000813590506106628161063c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061069382610668565b9050919050565b6106a381610688565b81146106ae57600080fd5b50565b6000813590506106c08161069a565b92915050565b600080604083850312156106dd576106dc610628565b5b60006106eb85828601610653565b92505060206106fc858286016106b1565b9150509250929050565b61070f81610688565b82525050565b600060208201905061072a6000830184610706565b92915050565b60006020828403121561074657610745610628565b5b600061075484828501610653565b91505092915050565b6000806040838503121561077457610773610628565b5b6000610782858286016106b1565b9250506020610793858286016106b1565b9150509250929050565b60006040820190506107b26000830185610706565b6107bf6020830184610706565b9392505050565b6000819050919050565b6107d9816107c6565b82525050565b60006020820190506107f460008301846107d0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261081f5761081e6107fa565b5b8235905067ffffffffffffffff81111561083c5761083b6107ff565b5b60208301915083600182028301111561085857610857610804565b5b9250929050565b600080600080600080600060a0888a03121561087e5761087d610628565b5b600061088c8a828b01610653565b975050602061089d8a828b016106b1565b96505060406108ae8a828b016106b1565b955050606088013567ffffffffffffffff8111156108cf576108ce61062d565b5b6108db8a828b01610809565b9450945050608088013567ffffffffffffffff8111156108fe576108fd61062d565b5b61090a8a828b01610809565b925092505092959891949750929550565b60008060008060006080868803121561093757610936610628565b5b600061094588828901610653565b9550506020610956888289016106b1565b9450506040610967888289016106b1565b935050606086013567ffffffffffffffff8111156109885761098761062d565b5b61099488828901610809565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b6109c8816109a3565b82525050565b60006040820190506109e360008301856109bf565b6109f060208301846109bf565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610a31578082015181840152602081019050610a16565b83811115610a40576000848401525b50505050565b6000601f19601f8301169050919050565b6000610a62826109f7565b610a6c8185610a02565b9350610a7c818560208601610a13565b610a8581610a46565b840191505092915050565b6000604082019050610aa56000830185610706565b8181036020830152610ab78184610a57565b90509392505050565b60068110610acd57600080fd5b50565b600081359050610adf81610ac0565b92915050565b600060208284031215610afb57610afa610628565b5b6000610b0984828501610ad0565b91505092915050565b610b1b81610632565b82525050565b6000604082019050610b366000830185610b12565b610b436020830184610706565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610b84826107c6565b9150610b8f836107c6565b925082821015610ba257610ba1610b4a565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220bd953a296586ccfc1eb62717b2a8c6d142d62d25fbdaeb2c2b7119de371b1d2264736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/SingleExecModule.sol:SingleExecModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/TriggerModule.json b/deployments/cornmaizenet/TriggerModule.json new file mode 100644 index 0000000..5e183f2 --- /dev/null +++ b/deployments/cornmaizenet/TriggerModule.json @@ -0,0 +1,695 @@ +{ + "address": "0x7BA16122e96DAf3455b13c6AE71175886E571093", + "abi": [ + { + "inputs": [], + "name": "encodeBlockTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_expression", + "type": "string" + } + ], + "name": "encodeCronTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bytes32[][]", + "name": "_topics", + "type": "bytes32[][]" + }, + { + "internalType": "uint256", + "name": "_blockConfirmations", + "type": "uint256" + } + ], + "name": "encodeEventTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_start", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_interval", + "type": "uint128" + } + ], + "name": "encodeTimeTriggerModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7364a7ee2d4c3616c90fc2c90094fb1db7ea57fed68826ff3742bd8994b214f8", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "1083056", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9fda08a74cd51d80ee48c30268af724347ba89f2011d9aeb08c0e3ce67bd9613", + "transactionHash": "0x7364a7ee2d4c3616c90fc2c90094fb1db7ea57fed68826ff3742bd8994b214f8", + "logs": [], + "blockNumber": 61006, + "cumulativeGasUsed": "1083056", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"encodeBlockTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_expression\",\"type\":\"string\"}],\"name\":\"encodeCronTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_topics\",\"type\":\"bytes32[][]\"},{\"internalType\":\"uint256\",\"name\":\"_blockConfirmations\",\"type\":\"uint256\"}],\"name\":\"encodeEventTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_interval\",\"type\":\"uint128\"}],\"name\":\"encodeTimeTriggerModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeCronTriggerModuleArg(string)\":{\"params\":{\"_expression\":\"Cron expression\"}},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"params\":{\"_address\":\"Address to listen to for events.\",\"_blockConfirmations\":\"Number of blocks to wait for before triggering.\",\"_topics\":\"Set of topics to filter at each topic position.\"}},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"params\":{\"_interval\":\"Time interval between each execution.\",\"_start\":\"Time when the first execution should occur.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeBlockTriggerModuleArg()\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Block.\"},\"encodeCronTriggerModuleArg(string)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Cron.\"},\"encodeEventTriggerModuleArg(address,bytes32[][],uint256)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Event.\"},\"encodeTimeTriggerModuleArg(uint128,uint128)\":{\"notice\":\"Helper function to encode arguments for TriggerModule for Timer.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/TriggerModule.sol\":\"TriggerModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/TriggerModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\n\\n// solhint-disable not-rely-on-time\\ncontract TriggerModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Timer.\\n *\\n * @param _start Time when the first execution should occur.\\n * @param _interval Time interval between each execution.\\n */\\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_start, _interval);\\n\\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Cron.\\n *\\n * @param _expression Cron expression\\n */\\n function encodeCronTriggerModuleArg(string calldata _expression)\\n external\\n pure\\n returns (bytes memory)\\n {\\n bytes memory triggerConfig = abi.encode(_expression);\\n\\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Event.\\n *\\n * @param _address Address to listen to for events.\\n * @param _topics Set of topics to filter at each topic position.\\n * @param _blockConfirmations Number of blocks to wait for before triggering.\\n */\\n function encodeEventTriggerModuleArg(\\n address _address,\\n bytes32[][] memory _topics,\\n uint256 _blockConfirmations\\n ) external pure returns (bytes memory) {\\n bytes memory triggerConfig = abi.encode(\\n _address,\\n _topics,\\n _blockConfirmations\\n );\\n\\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\\n }\\n\\n /**\\n * @notice Helper function to encode arguments for TriggerModule for Block.\\n */\\n function encodeBlockTriggerModuleArg()\\n external\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\\n }\\n}\\n\",\"keccak256\":\"0xa2027b6a435d4c6aa33ba5e6486865563ac26fc15d1fe6baa62b2cf6efbaf394\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611299806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063994ee8b711610097578063b81cd86611610066578063b81cd866146102fa578063c10304f71461032b578063cd3d4fb91461035c578063ddca3f431461038c57610100565b8063994ee8b714610262578063ac21631a14610292578063b0ccbdf0146102c2578063b2db0b41146102de57610100565b8063647846a5116100d3578063647846a5146101b35780636d2dd29f146101d1578063714d732f1461020157806376474e6a1461023157610100565b8063121b944c1461010557806314ae9926146101235780631fc2d3d0146101535780632e6e0bd014610183575b600080fd5b61010d6103aa565b60405161011a919061072c565b60405180910390f35b61013d600480360381019061013891906107f6565b6103d2565b60405161014a9190610845565b60405180910390f35b61016d600480360381019061016891906108a8565b6103dd565b60405161017a919061072c565b60405180910390f35b61019d600480360381019061019891906108e8565b610431565b6040516101aa9190610845565b60405180910390f35b6101bb610464565b6040516101c89190610845565b60405180910390f35b6101eb60048036038101906101e691906108e8565b61048a565b6040516101f89190610845565b60405180910390f35b61021b6004803603810190610216919061097a565b6104bd565b604051610228919061072c565b60405180910390f35b61024b600480360381019061024691906109c7565b610511565b604051610259929190610a07565b60405180910390f35b61027c60048036038101906102779190610c85565b610521565b604051610289919061072c565b60405180910390f35b6102ac60048036038101906102a791906108e8565b610578565b6040516102b99190610d03565b60405180910390f35b6102dc60048036038101906102d79190610d74565b610590565b005b6102f860048036038101906102f39190610e30565b610599565b005b610314600480360381019061030f91906108e8565b6105a0565b604051610322929190610ec7565b60405180910390f35b61034560048036038101906103409190610e30565b6105fc565b604051610353929190610ef0565b60405180910390f35b61037660048036038101906103719190610f45565b61065a565b6040516103839190610845565b60405180910390f35b61039461068d565b6040516103a19190610d03565b60405180910390f35b606060036040516020016103be9190610fe9565b604051602081830303815290604052905090565b600081905092915050565b6060600083836040516020016103f4929190610ec7565b6040516020818303038152906040529050600081604051602001610419929190611004565b60405160208183030381529060405291505092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083836040516020016104d4929190611081565b60405160208183030381529060405290506001816040516020016104f9929190611004565b60405160208183030381529060405291505092915050565b6000808383915091509250929050565b6060600084848460405160200161053a93929190611225565b604051602081830303815290604052905060028160405160200161055f929190611004565b6040516020818303038152906040529150509392505050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600081519050919050565b600082825260208201905092915050565b60005b838110156106cd5780820151818401526020810190506106b2565b838111156106dc576000848401525b50505050565b6000601f19601f8301169050919050565b60006106fe82610693565b610708818561069e565b93506107188185602086016106af565b610721816106e2565b840191505092915050565b6000602082019050818103600083015261074681846106f3565b905092915050565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61077581610762565b811461078057600080fd5b50565b6000813590506107928161076c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107c382610798565b9050919050565b6107d3816107b8565b81146107de57600080fd5b50565b6000813590506107f0816107ca565b92915050565b6000806040838503121561080d5761080c610758565b5b600061081b85828601610783565b925050602061082c858286016107e1565b9150509250929050565b61083f816107b8565b82525050565b600060208201905061085a6000830184610836565b92915050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61088581610860565b811461089057600080fd5b50565b6000813590506108a28161087c565b92915050565b600080604083850312156108bf576108be610758565b5b60006108cd85828601610893565b92505060206108de85828601610893565b9150509250929050565b6000602082840312156108fe576108fd610758565b5b600061090c84828501610783565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261093a57610939610915565b5b8235905067ffffffffffffffff8111156109575761095661091a565b5b6020830191508360018202830111156109735761097261091f565b5b9250929050565b6000806020838503121561099157610990610758565b5b600083013567ffffffffffffffff8111156109af576109ae61075d565b5b6109bb85828601610924565b92509250509250929050565b600080604083850312156109de576109dd610758565b5b60006109ec858286016107e1565b92505060206109fd858286016107e1565b9150509250929050565b6000604082019050610a1c6000830185610836565b610a296020830184610836565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a68826106e2565b810181811067ffffffffffffffff82111715610a8757610a86610a30565b5b80604052505050565b6000610a9a61074e565b9050610aa68282610a5f565b919050565b600067ffffffffffffffff821115610ac657610ac5610a30565b5b602082029050602081019050919050565b600067ffffffffffffffff821115610af257610af1610a30565b5b602082029050602081019050919050565b6000610b16610b1184610ad7565b610a90565b90508083825260208201905060208402830185811115610b3957610b3861091f565b5b835b81811015610b625780610b4e8882610783565b845260208401935050602081019050610b3b565b5050509392505050565b600082601f830112610b8157610b80610915565b5b8135610b91848260208601610b03565b91505092915050565b6000610bad610ba884610aab565b610a90565b90508083825260208201905060208402830185811115610bd057610bcf61091f565b5b835b81811015610c1757803567ffffffffffffffff811115610bf557610bf4610915565b5b808601610c028982610b6c565b85526020850194505050602081019050610bd2565b5050509392505050565b600082601f830112610c3657610c35610915565b5b8135610c46848260208601610b9a565b91505092915050565b6000819050919050565b610c6281610c4f565b8114610c6d57600080fd5b50565b600081359050610c7f81610c59565b92915050565b600080600060608486031215610c9e57610c9d610758565b5b6000610cac868287016107e1565b935050602084013567ffffffffffffffff811115610ccd57610ccc61075d565b5b610cd986828701610c21565b9250506040610cea86828701610c70565b9150509250925092565b610cfd81610c4f565b82525050565b6000602082019050610d186000830184610cf4565b92915050565b60008083601f840112610d3457610d33610915565b5b8235905067ffffffffffffffff811115610d5157610d5061091a565b5b602083019150836001820283011115610d6d57610d6c61091f565b5b9250929050565b600080600080600080600060a0888a031215610d9357610d92610758565b5b6000610da18a828b01610783565b9750506020610db28a828b016107e1565b9650506040610dc38a828b016107e1565b955050606088013567ffffffffffffffff811115610de457610de361075d565b5b610df08a828b01610d1e565b9450945050608088013567ffffffffffffffff811115610e1357610e1261075d565b5b610e1f8a828b01610d1e565b925092505092959891949750929550565b600080600080600060808688031215610e4c57610e4b610758565b5b6000610e5a88828901610783565b9550506020610e6b888289016107e1565b9450506040610e7c888289016107e1565b935050606086013567ffffffffffffffff811115610e9d57610e9c61075d565b5b610ea988828901610d1e565b92509250509295509295909350565b610ec181610860565b82525050565b6000604082019050610edc6000830185610eb8565b610ee96020830184610eb8565b9392505050565b6000604082019050610f056000830185610836565b8181036020830152610f1781846106f3565b90509392505050565b60068110610f2d57600080fd5b50565b600081359050610f3f81610f20565b92915050565b600060208284031215610f5b57610f5a610758565b5b6000610f6984828501610f30565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110610fb257610fb1610f72565b5b50565b6000819050610fc382610fa1565b919050565b6000610fd382610fb5565b9050919050565b610fe381610fc8565b82525050565b6000602082019050610ffe6000830184610fda565b92915050565b60006040820190506110196000830185610fda565b818103602083015261102b81846106f3565b90509392505050565b600082825260208201905092915050565b82818337600083830152505050565b60006110608385611034565b935061106d838584611045565b611076836106e2565b840190509392505050565b6000602082019050818103600083015261109c818486611054565b90509392505050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61110681610762565b82525050565b600061111883836110fd565b60208301905092915050565b6000602082019050919050565b600061113c826110d1565b61114681856110dc565b9350611151836110ed565b8060005b83811015611182578151611169888261110c565b975061117483611124565b925050600181019050611155565b5085935050505092915050565b600061119b8383611131565b905092915050565b6000602082019050919050565b60006111bb826110a5565b6111c581856110b0565b9350836020820285016111d7856110c1565b8060005b8581101561121357848403895281516111f4858261118f565b94506111ff836111a3565b925060208a019950506001810190506111db565b50829750879550505050505092915050565b600060608201905061123a6000830186610836565b818103602083015261124c81856111b0565b905061125b6040830184610cf4565b94935050505056fea2646970667358221220a70c9470c83e6d58d272b5093c1ea0b2190f3e74131282520928de053adb1c0764736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeCronTriggerModuleArg(string)": { + "params": { + "_expression": "Cron expression" + } + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "params": { + "_address": "Address to listen to for events.", + "_blockConfirmations": "Number of blocks to wait for before triggering.", + "_topics": "Set of topics to filter at each topic position." + } + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "params": { + "_interval": "Time interval between each execution.", + "_start": "Time when the first execution should occur." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeBlockTriggerModuleArg()": { + "notice": "Helper function to encode arguments for TriggerModule for Block." + }, + "encodeCronTriggerModuleArg(string)": { + "notice": "Helper function to encode arguments for TriggerModule for Cron." + }, + "encodeEventTriggerModuleArg(address,bytes32[][],uint256)": { + "notice": "Helper function to encode arguments for TriggerModule for Event." + }, + "encodeTimeTriggerModuleArg(uint128,uint128)": { + "notice": "Helper function to encode arguments for TriggerModule for Timer." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/TriggerModule.sol:TriggerModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/Web3FunctionModule.json b/deployments/cornmaizenet/Web3FunctionModule.json new file mode 100644 index 0000000..cc8b21c --- /dev/null +++ b/deployments/cornmaizenet/Web3FunctionModule.json @@ -0,0 +1,613 @@ +{ + "address": "0x0C349de27C84c2e29238A60fDd964F7EF1dc2C52", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_web3FunctionHash", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_web3FunctionArgsHex", + "type": "bytes" + } + ], + "name": "encodeModuleArg", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "execAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nonce1Balance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onCreateTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "execData", + "type": "bytes" + } + ], + "name": "postExecCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + } + ], + "name": "preCancelTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_taskCreator", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + } + ], + "name": "preCreateTask", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "_execAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_execData", + "type": "bytes" + } + ], + "name": "preExecCall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskCreator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum LibDataTypes.Module", + "name": "", + "type": "uint8" + } + ], + "name": "taskModuleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "timedTask", + "outputs": [ + { + "internalType": "uint128", + "name": "nextExec", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "interval", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x94dee4dd7f68457318844349b0fcae2bda192783e13bf0ce5000b902a095cb75", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x7aD7b5F4F0E5Df7D6Aa5444516429AF77babc3A0", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "752313", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1b41413b29cd32f7fb1fab8fe6658436ef48fdf766686bd51ec0ee7562a4369d", + "transactionHash": "0x94dee4dd7f68457318844349b0fcae2bda192783e13bf0ce5000b902a095cb75", + "logs": [], + "blockNumber": 61007, + "cumulativeGasUsed": "752313", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "5ec0b75b82308a43c369e536d3b31fb6", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_web3FunctionHash\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"_web3FunctionArgsHex\",\"type\":\"bytes\"}],\"name\":\"encodeModuleArg\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"execAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nonce1Balance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onCreateTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"taskId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"postExecCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"}],\"name\":\"preCancelTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_taskCreator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"}],\"name\":\"preCreateTask\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_execAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_execData\",\"type\":\"bytes\"}],\"name\":\"preExecCall\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"taskCreator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum LibDataTypes.Module\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"taskModuleAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"timedTask\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"nextExec\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"interval\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"params\":{\"_web3FunctionArgsHex\":\"Arguments to be passed into web3 function in hex.\",\"_web3FunctionHash\":\"IPFS hash of web3 function.\"}},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"initModuleArg\":\"Encoded arguments for module if any.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"postExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"}},\"preCancelTask(bytes32,address)\":{\"details\":\"Modules can override taskCreator.\",\"params\":{\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\"}},\"preCreateTask(address,address)\":{\"details\":\"Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\",\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"taskCreator\":\"The address which created the task.\"},\"returns\":{\"_0\":\"address Overriden or original taskCreator.\",\"_1\":\"address Overriden or original execAddress.\"}},\"preExecCall(bytes32,address,address,bytes)\":{\"params\":{\"execAddress\":\"Address of contract that should be called.\",\"execData\":\"Execution data to be called with / function selector if execution data is yet to be determined.\",\"taskCreator\":\"The address which created the task.\",\"taskId\":\"Unique hash of the task created.\"},\"returns\":{\"_0\":\"address Overriden or original execution address.\",\"_1\":\"bytes Overriden or original execution data.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"encodeModuleArg(string,bytes)\":{\"notice\":\"Helper function to encode arguments for Web3FunctionModule.\"},\"onCreateTask(bytes32,address,address,bytes,bytes)\":{\"notice\":\"Initiates task module whenever `createTask` is being called.\"},\"postExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and after execAddress is called.\"},\"preCancelTask(bytes32,address)\":{\"notice\":\"Called before taskId is removed from _createdTasks[].\"},\"preCreateTask(address,address)\":{\"notice\":\"Called before generating taskId.\"},\"preExecCall(bytes32,address,address,bytes)\":{\"notice\":\"Called during `exec` and before execAddress is called.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/taskModules/Web3FunctionModule.sol\":\"Web3FunctionModule\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9f4357008a8f7d8c8bf5d48902e789637538d8c016be5766610901b4bba81514\",\"license\":\"MIT\"},\"contracts/AutomateStorage.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport {LibDataTypes} from \\\"./libraries/LibDataTypes.sol\\\";\\n\\n/**\\n * @notice Storage layout of Automate smart contract.\\n */\\n// solhint-disable max-states-count\\nabstract contract AutomateStorage {\\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\\n\\n uint256 public fee;\\n address public feeToken;\\n\\n ///@dev Appended State\\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\\n}\\n\",\"keccak256\":\"0xdc7009675d6be9436f1223a82c64b80f8f2ef8c2a594298bf6d5db8b201d45f8\",\"license\":\"UNLICENSED\"},\"contracts/functions/FExec.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.12;\\n\\nimport {GelatoBytes} from \\\"../vendor/gelato/GelatoBytes.sol\\\";\\n\\n// solhint-disable private-vars-leading-underscore\\n// solhint-disable func-visibility\\n\\nfunction _call(\\n address _add,\\n bytes memory _data,\\n uint256 _value,\\n bool _revertOnFailure,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.call{value: _value}(_data);\\n\\n if (!success && _revertOnFailure)\\n GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\\nfunction _delegateCall(\\n address _add,\\n bytes memory _data,\\n string memory _tracingInfo\\n) returns (bool success, bytes memory returnData) {\\n (success, returnData) = _add.delegatecall(_data);\\n\\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\\n}\\n\",\"keccak256\":\"0x48375d0645cf4dfe7d3f18dc727cbb2322a09233a2e9cce9352a73acc357bf07\",\"license\":\"MIT\"},\"contracts/interfaces/ITaskModule.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\ninterface ITaskModule {\\n /**\\n * @notice Called before generating taskId.\\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\\n *\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n *\\n * @return address Overriden or original taskCreator.\\n * @return address Overriden or original execAddress.\\n */\\n function preCreateTask(address taskCreator, address execAddress)\\n external\\n returns (address, address);\\n\\n /**\\n * @notice Initiates task module whenever `createTask` is being called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n * @param initModuleArg Encoded arguments for module if any.\\n */\\n function onCreateTask(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData,\\n bytes calldata initModuleArg\\n ) external;\\n\\n /**\\n * @notice Called before taskId is removed from _createdTasks[].\\n * @dev Modules can override taskCreator.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n *\\n * @return address Overriden or original taskCreator.\\n */\\n function preCancelTask(bytes32 taskId, address taskCreator)\\n external\\n returns (address);\\n\\n /**\\n * @notice Called during `exec` and before execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n *\\n * @return address Overriden or original execution address.\\n * @return bytes Overriden or original execution data.\\n */\\n function preExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external returns (address, bytes memory);\\n\\n /**\\n * @notice Called during `exec` and after execAddress is called.\\n *\\n * @param taskId Unique hash of the task created.\\n * @param taskCreator The address which created the task.\\n * @param execAddress Address of contract that should be called.\\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\\n */\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external;\\n}\\n\",\"keccak256\":\"0xd537257852c23ce7d0bc392b03aba1efd750be372d64a01edf1c726ef7c4274d\",\"license\":\"MIT\"},\"contracts/libraries/LibDataTypes.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.12;\\n\\n// solhint-disable max-line-length\\nlibrary LibDataTypes {\\n /**\\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\\n *\\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\\n * @param DEPRECATED_TIME deprecated\\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\\n */\\n enum Module {\\n RESOLVER,\\n DEPRECATED_TIME, // @deprecated\\n PROXY,\\n SINGLE_EXEC,\\n WEB3_FUNCTION,\\n TRIGGER\\n }\\n\\n /**\\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\\n *\\n * @param modules List of selected modules.\\n * @param args Arguments of modules if any. Pass \\\"0x\\\" for modules which does not require args {See encodeModuleArg}\\n */\\n struct ModuleData {\\n Module[] modules;\\n bytes[] args;\\n }\\n\\n /**\\n * @notice Struct for time module.\\n *\\n * @param nextExec Time when the next execution should occur.\\n * @param interval Time interval between each execution.\\n */\\n struct Time {\\n uint128 nextExec;\\n uint128 interval;\\n }\\n\\n /**\\n * @notice Types of trigger\\n *\\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\\n */\\n enum TriggerType {\\n TIME,\\n CRON,\\n EVENT,\\n BLOCK\\n }\\n\\n /**\\n * @notice Struct for trigger module\\n *\\n * @param triggerType Type of the trigger\\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\\n */\\n struct TriggerModuleData {\\n TriggerType triggerType;\\n bytes triggerConfig;\\n }\\n}\\n\",\"keccak256\":\"0x7307461a03c5bb31eef8b01b029fd898d45a495349498466c6238a6474c4edc2\",\"license\":\"MIT\"},\"contracts/taskModules/TaskModuleBase.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {AutomateStorage} from \\\"../AutomateStorage.sol\\\";\\nimport {ITaskModule} from \\\"../interfaces/ITaskModule.sol\\\";\\n\\n// solhint-disable no-empty-blocks\\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\\n ///@inheritdoc ITaskModule\\n function preCreateTask(address _taskCreator, address _execAddress)\\n external\\n virtual\\n override\\n returns (address, address)\\n {\\n return (_taskCreator, _execAddress);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function onCreateTask(\\n bytes32,\\n address,\\n address,\\n bytes calldata,\\n bytes calldata\\n ) external virtual override {}\\n\\n ///@inheritdoc ITaskModule\\n function preCancelTask(bytes32, address _taskCreator)\\n external\\n virtual\\n override\\n returns (address)\\n {\\n return _taskCreator;\\n }\\n\\n ///@inheritdoc ITaskModule\\n function preExecCall(\\n bytes32,\\n address,\\n address _execAddress,\\n bytes calldata _execData\\n ) external virtual override returns (address, bytes memory) {\\n return (_execAddress, _execData);\\n }\\n\\n ///@inheritdoc ITaskModule\\n function postExecCall(\\n bytes32 taskId,\\n address taskCreator,\\n address execAddress,\\n bytes calldata execData\\n ) external virtual override {}\\n}\\n\",\"keccak256\":\"0x231bcf0d6af7d2e0f96eb4eb83285fe0ea0d64d3aa937c6af29779cf653af695\",\"license\":\"UNLICENSED\"},\"contracts/taskModules/Web3FunctionModule.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nimport {TaskModuleBase} from \\\"./TaskModuleBase.sol\\\";\\nimport {LibDataTypes} from \\\"../libraries/LibDataTypes.sol\\\";\\nimport {_call} from \\\"../functions/FExec.sol\\\";\\n\\ncontract Web3FunctionModule is TaskModuleBase {\\n /**\\n * @notice Helper function to encode arguments for Web3FunctionModule.\\n *\\n * @param _web3FunctionHash IPFS hash of web3 function.\\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\\n */\\n function encodeModuleArg(\\n string memory _web3FunctionHash,\\n bytes calldata _web3FunctionArgsHex\\n ) external pure returns (bytes memory) {\\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\\n }\\n}\\n\",\"keccak256\":\"0xab0ed462273f102db2e9a3256d43a5423ace3c3001d120307c258989d2d67d67\",\"license\":\"UNLICENSED\"},\"contracts/vendor/gelato/GelatoBytes.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.12;\\n\\nlibrary GelatoBytes {\\n function calldataSliceSelector(bytes calldata _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function memorySliceSelector(bytes memory _bytes)\\n internal\\n pure\\n returns (bytes4 selector)\\n {\\n selector =\\n _bytes[0] |\\n (bytes4(_bytes[1]) >> 8) |\\n (bytes4(_bytes[2]) >> 16) |\\n (bytes4(_bytes[3]) >> 24);\\n }\\n\\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"))\\n );\\n }\\n } else {\\n revert(\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"))\\n );\\n }\\n }\\n\\n function returnError(bytes memory _bytes, string memory _tracingInfo)\\n internal\\n pure\\n returns (string memory)\\n {\\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\\n if (_bytes.length % 32 == 4) {\\n bytes4 selector;\\n assembly {\\n selector := mload(add(0x20, _bytes))\\n }\\n if (selector == 0x08c379a0) {\\n // Function selector for Error(string)\\n assembly {\\n _bytes := add(_bytes, 68)\\n }\\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"NoErrorSelector\\\"));\\n }\\n } else {\\n return\\n string(abi.encodePacked(_tracingInfo, \\\"UnexpectedReturndata\\\"));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec59b2c6f678f3bbe186677e5970e59e46a40d22881dc813c49ffb18e417951\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c9f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063ac21631a1161008c578063b81cd86611610066578063b81cd8661461024b578063c10304f71461027c578063cd3d4fb9146102ad578063ddca3f43146102dd576100cf565b8063ac21631a146101e3578063b0ccbdf014610213578063b2db0b411461022f576100cf565b806314ae9926146100d45780632e6e0bd014610104578063647846a5146101345780636a796a8a146101525780636d2dd29f1461018257806376474e6a146101b2575b600080fd5b6100ee60048036038101906100e99190610594565b6102fb565b6040516100fb91906105e3565b60405180910390f35b61011e600480360381019061011991906105fe565b610306565b60405161012b91906105e3565b60405180910390f35b61013c610339565b60405161014991906105e3565b60405180910390f35b61016c600480360381019061016791906107d1565b61035f565b60405161017991906108d5565b60405180910390f35b61019c600480360381019061019791906105fe565b61038e565b6040516101a991906105e3565b60405180910390f35b6101cc60048036038101906101c791906108f7565b6103c1565b6040516101da929190610937565b60405180910390f35b6101fd60048036038101906101f891906105fe565b6103d1565b60405161020a9190610979565b60405180910390f35b61022d60048036038101906102289190610994565b6103e9565b005b61024960048036038101906102449190610a50565b6103f2565b005b610265600480360381019061026091906105fe565b6103f9565b604051610273929190610b03565b60405180910390f35b61029660048036038101906102919190610a50565b610455565b6040516102a4929190610b2c565b60405180910390f35b6102c760048036038101906102c29190610b81565b6104b3565b6040516102d491906105e3565b60405180910390f35b6102e56104e6565b6040516102f29190610979565b60405180910390f35b600081905092915050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606083838360405160200161037693929190610c30565b60405160208183030381529060405290509392505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808383915091509250929050565b60076020528060005260406000206000915090505481565b50505050505050565b5050505050565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b6000606084848481818080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505090509050915091509550959350505050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61051381610500565b811461051e57600080fd5b50565b6000813590506105308161050a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061056182610536565b9050919050565b61057181610556565b811461057c57600080fd5b50565b60008135905061058e81610568565b92915050565b600080604083850312156105ab576105aa6104f6565b5b60006105b985828601610521565b92505060206105ca8582860161057f565b9150509250929050565b6105dd81610556565b82525050565b60006020820190506105f860008301846105d4565b92915050565b600060208284031215610614576106136104f6565b5b600061062284828501610521565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61067e82610635565b810181811067ffffffffffffffff8211171561069d5761069c610646565b5b80604052505050565b60006106b06104ec565b90506106bc8282610675565b919050565b600067ffffffffffffffff8211156106dc576106db610646565b5b6106e582610635565b9050602081019050919050565b82818337600083830152505050565b600061071461070f846106c1565b6106a6565b9050828152602081018484840111156107305761072f610630565b5b61073b8482856106f2565b509392505050565b600082601f8301126107585761075761062b565b5b8135610768848260208601610701565b91505092915050565b600080fd5b600080fd5b60008083601f8401126107915761079061062b565b5b8235905067ffffffffffffffff8111156107ae576107ad610771565b5b6020830191508360018202830111156107ca576107c9610776565b5b9250929050565b6000806000604084860312156107ea576107e96104f6565b5b600084013567ffffffffffffffff811115610808576108076104fb565b5b61081486828701610743565b935050602084013567ffffffffffffffff811115610835576108346104fb565b5b6108418682870161077b565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b8381101561088757808201518184015260208101905061086c565b83811115610896576000848401525b50505050565b60006108a78261084d565b6108b18185610858565b93506108c1818560208601610869565b6108ca81610635565b840191505092915050565b600060208201905081810360008301526108ef818461089c565b905092915050565b6000806040838503121561090e5761090d6104f6565b5b600061091c8582860161057f565b925050602061092d8582860161057f565b9150509250929050565b600060408201905061094c60008301856105d4565b61095960208301846105d4565b9392505050565b6000819050919050565b61097381610960565b82525050565b600060208201905061098e600083018461096a565b92915050565b600080600080600080600060a0888a0312156109b3576109b26104f6565b5b60006109c18a828b01610521565b97505060206109d28a828b0161057f565b96505060406109e38a828b0161057f565b955050606088013567ffffffffffffffff811115610a0457610a036104fb565b5b610a108a828b0161077b565b9450945050608088013567ffffffffffffffff811115610a3357610a326104fb565b5b610a3f8a828b0161077b565b925092505092959891949750929550565b600080600080600060808688031215610a6c57610a6b6104f6565b5b6000610a7a88828901610521565b9550506020610a8b8882890161057f565b9450506040610a9c8882890161057f565b935050606086013567ffffffffffffffff811115610abd57610abc6104fb565b5b610ac98882890161077b565b92509250509295509295909350565b60006fffffffffffffffffffffffffffffffff82169050919050565b610afd81610ad8565b82525050565b6000604082019050610b186000830185610af4565b610b256020830184610af4565b9392505050565b6000604082019050610b4160008301856105d4565b8181036020830152610b53818461089c565b90509392505050565b60068110610b6957600080fd5b50565b600081359050610b7b81610b5c565b92915050565b600060208284031215610b9757610b966104f6565b5b6000610ba584828501610b6c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000610bd582610bae565b610bdf8185610bb9565b9350610bef818560208601610869565b610bf881610635565b840191505092915050565b6000610c0f8385610858565b9350610c1c8385846106f2565b610c2583610635565b840190509392505050565b60006040820190508181036000830152610c4a8186610bca565b90508181036020830152610c5f818486610c03565b905094935050505056fea2646970667358221220bcd93c741a0cf196ab42eb48c885cb5f54b029adbfccada3878f89c7d07a8e5864736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "encodeModuleArg(string,bytes)": { + "params": { + "_web3FunctionArgsHex": "Arguments to be passed into web3 function in hex.", + "_web3FunctionHash": "IPFS hash of web3 function." + } + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "initModuleArg": "Encoded arguments for module if any.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "postExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + } + }, + "preCancelTask(bytes32,address)": { + "details": "Modules can override taskCreator.", + "params": { + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original taskCreator." + } + }, + "preCreateTask(address,address)": { + "details": "Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}", + "params": { + "execAddress": "Address of contract that should be called.", + "taskCreator": "The address which created the task." + }, + "returns": { + "_0": "address Overriden or original taskCreator.", + "_1": "address Overriden or original execAddress." + } + }, + "preExecCall(bytes32,address,address,bytes)": { + "params": { + "execAddress": "Address of contract that should be called.", + "execData": "Execution data to be called with / function selector if execution data is yet to be determined.", + "taskCreator": "The address which created the task.", + "taskId": "Unique hash of the task created." + }, + "returns": { + "_0": "address Overriden or original execution address.", + "_1": "bytes Overriden or original execution data." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "encodeModuleArg(string,bytes)": { + "notice": "Helper function to encode arguments for Web3FunctionModule." + }, + "onCreateTask(bytes32,address,address,bytes,bytes)": { + "notice": "Initiates task module whenever `createTask` is being called." + }, + "postExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and after execAddress is called." + }, + "preCancelTask(bytes32,address)": { + "notice": "Called before taskId is removed from _createdTasks[]." + }, + "preCreateTask(address,address)": { + "notice": "Called before generating taskId." + }, + "preExecCall(bytes32,address,address,bytes)": { + "notice": "Called during `exec` and before execAddress is called." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2704, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskCreator", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2709, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "execAddresses", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_address)" + }, + { + "astId": 2715, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_createdTasks", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)" + }, + { + "astId": 2717, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "fee", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2719, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "feeToken", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 2725, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "timedTask", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_struct(Time)5933_storage)" + }, + { + "astId": 2731, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "taskModuleAddresses", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_enum(Module)5920,t_address)" + }, + { + "astId": 2735, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nonce1Balance", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Module)5920": { + "encoding": "inplace", + "label": "enum LibDataTypes.Module", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_struct(Bytes32Set)1666_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct EnumerableSet.Bytes32Set)", + "numberOfBytes": "32", + "value": "t_struct(Bytes32Set)1666_storage" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_struct(Time)5933_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct LibDataTypes.Time)", + "numberOfBytes": "32", + "value": "t_struct(Time)5933_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(Module)5920,t_address)": { + "encoding": "mapping", + "key": "t_enum(Module)5920", + "label": "mapping(enum LibDataTypes.Module => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_struct(Bytes32Set)1666_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Bytes32Set", + "members": [ + { + "astId": 1665, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)1472_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)1472_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 1467, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 1471, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Time)5933_storage": { + "encoding": "inplace", + "label": "struct LibDataTypes.Time", + "members": [ + { + "astId": 5930, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "nextExec", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 5932, + "contract": "contracts/taskModules/Web3FunctionModule.sol:Web3FunctionModule", + "label": "interval", + "offset": 16, + "slot": "0", + "type": "t_uint128" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json b/deployments/cornmaizenet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json new file mode 100644 index 0000000..47ffac2 --- /dev/null +++ b/deployments/cornmaizenet/solcInputs/4a46ee6c1a29be400c9fab1ecc28e172.json @@ -0,0 +1,41 @@ +{ + "language": "Solidity", + "sources": { + "solc_0.8/proxy/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable {\n _setOwner(ownerAddress);\n _setImplementation(implementationAddress, data);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function owner() external view returns (address) {\n return _owner();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferOwnership(address newOwner) external onlyOwner {\n _setOwner(newOwner);\n }\n\n function upgradeTo(address newImplementation) external onlyOwner {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyOwner {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyOwner() {\n require(msg.sender == _owner(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _owner() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\n }\n }\n\n function _setOwner(address newOwner) internal {\n address previousOwner = _owner();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, newOwner)\n }\n emit OwnershipTransferred(previousOwner, newOwner);\n }\n}\n" + }, + "solc_0.8/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(address indexed previousImplementation, address indexed newImplementation);\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(gas(), implementationAddress, 0x0, calldatasize(), 0, 0)\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data) internal {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, newImplementation)\n }\n\n emit ProxyImplementationUpdated(previousImplementation, newImplementation);\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + }, + "solc_0.8/proxy/EIP173ProxyWithReceive.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"./EIP173Proxy.sol\";\n\n///@notice Proxy implementing EIP173 for ownership management that accept ETH via receive\ncontract EIP173ProxyWithReceive is EIP173Proxy {\n constructor(\n address implementationAddress,\n address ownerAddress,\n bytes memory data\n ) payable EIP173Proxy(implementationAddress, ownerAddress, data) {}\n\n receive() external payable override {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 999999 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/cornmaizenet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json b/deployments/cornmaizenet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json new file mode 100644 index 0000000..d4c0619 --- /dev/null +++ b/deployments/cornmaizenet/solcInputs/5ec0b75b82308a43c369e536d3b31fb6.json @@ -0,0 +1,224 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```solidity\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/Automate.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {Gelatofied} from \"./vendor/gelato/Gelatofied.sol\";\nimport {GelatoBytes} from \"./vendor/gelato/GelatoBytes.sol\";\nimport {Proxied} from \"./vendor/proxy/EIP173/Proxied.sol\";\nimport {AutomateStorage} from \"./AutomateStorage.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\nimport {LibEvents} from \"./libraries/LibEvents.sol\";\nimport {LibTaskId} from \"./libraries/LibTaskId.sol\";\nimport {LibTaskModule} from \"./libraries/LibTaskModule.sol\";\nimport {LibBypassModule} from \"./libraries/LibBypassModule.sol\";\nimport {IAutomate} from \"./interfaces/IAutomate.sol\";\n\n/**\n * @notice Automate enables everyone to have Gelato monitor and execute transactions.\n * @notice ExecAddress refers to the contract that has the function which Gelato will call.\n * @notice Modules allow users to customise conditions and specifications when creating a task.\n */\n//solhint-disable function-max-lines\n//solhint-disable no-empty-blocks\ncontract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {\n using GelatoBytes for bytes;\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n // solhint-disable const-name-snakecase\n string public constant version = \"7\";\n\n constructor(address payable _gelato) Gelatofied(_gelato) {}\n\n ///@inheritdoc IAutomate\n function createTask(\n address _execAddress,\n bytes calldata _execDataOrSelector,\n LibDataTypes.ModuleData calldata _moduleData,\n address _feeToken\n ) external override returns (bytes32 taskId) {\n address taskCreator;\n\n (taskCreator, _execAddress) = LibTaskModule.preCreateTask(\n msg.sender,\n _execAddress,\n taskModuleAddresses\n );\n\n taskId = _createTask(\n taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n ///@inheritdoc IAutomate\n function cancelTask(bytes32 _taskId) external {\n address _taskCreator = LibTaskModule.preCancelTask(\n _taskId,\n msg.sender,\n taskModuleAddresses\n );\n\n _cancelTask(_taskCreator, _taskId);\n }\n\n ///@inheritdoc IAutomate\n function exec(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n uint256 _txFee,\n address _feeToken,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecSuccess(\n _txFee,\n _feeToken,\n _execAddress,\n _execData,\n taskId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function exec1Balance(\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData calldata _moduleData,\n Gelato1BalanceParam calldata _oneBalanceParam,\n bool _revertOnFailure\n ) external onlyGelato {\n bytes32 taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execData.memorySliceSelector(),\n _moduleData,\n address(0)\n );\n\n require(\n _createdTasks[_taskCreator].contains(taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibTaskModule.onExecTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.modules,\n _revertOnFailure,\n taskModuleAddresses\n );\n\n emit LibEvents.ExecSuccess(\n 0,\n address(0),\n _execAddress,\n _execData,\n taskId,\n success\n );\n\n emit LogUseGelato1Balance(\n _oneBalanceParam.sponsor,\n _execAddress,\n _oneBalanceParam.feeToken,\n _oneBalanceParam.oneBalanceChainId,\n _oneBalanceParam.nativeToFeeTokenXRateNumerator,\n _oneBalanceParam.nativeToFeeTokenXRateDenominator,\n _oneBalanceParam.correlationId\n );\n }\n\n function execBypassModuleSyncFee(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n uint256 _txFee,\n address _feeToken,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n fee = _txFee;\n feeToken = _feeToken;\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n delete fee;\n delete feeToken;\n\n emit LibEvents.ExecBypassModuleSyncFeeSuccess(\n _taskId,\n _txFee,\n _feeToken,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function execBypassModule(\n address _taskCreator,\n address _execAddress,\n bytes32 _taskId,\n bytes32 _correlationId,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec\n ) external onlyGelato {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.exec: Task not found\"\n );\n\n bool success = LibBypassModule.onExecTask(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _revertOnFailure,\n _singleExec,\n _createdTasks\n );\n\n emit LibEvents.ExecBypassModuleSuccess(\n _taskId,\n _correlationId,\n success\n );\n }\n\n ///@inheritdoc IAutomate\n function setModule(\n LibDataTypes.Module[] calldata _modules,\n address[] calldata _moduleAddresses\n ) external onlyProxyAdmin {\n uint256 length = _modules.length;\n for (uint256 i; i < length; i++) {\n taskModuleAddresses[_modules[i]] = _moduleAddresses[i];\n }\n }\n\n ///@inheritdoc IAutomate\n function getFeeDetails() external view returns (uint256, address) {\n return (fee, feeToken);\n }\n\n ///@inheritdoc IAutomate\n function getTaskIdsByUser(address _taskCreator)\n external\n view\n returns (bytes32[] memory)\n {\n bytes32[] memory taskIds = _createdTasks[_taskCreator].values();\n\n return taskIds;\n }\n\n ///@inheritdoc IAutomate\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n );\n }\n\n function _createTask(\n address _taskCreator,\n address _execAddress,\n bytes memory _execDataOrSelector,\n LibDataTypes.ModuleData memory _moduleData,\n address _feeToken\n ) private returns (bytes32 taskId) {\n taskId = LibTaskId.getTaskId(\n _taskCreator,\n _execAddress,\n _execDataOrSelector.memorySliceSelector(),\n _moduleData,\n _feeToken\n );\n\n require(\n !_createdTasks[_taskCreator].contains(taskId),\n \"Automate.createTask: Duplicate task\"\n );\n\n LibTaskModule.onCreateTask(\n taskId,\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n taskModuleAddresses\n );\n\n _createdTasks[_taskCreator].add(taskId);\n\n emit LibEvents.TaskCreated(\n _taskCreator,\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken,\n taskId\n );\n }\n\n function _cancelTask(address _taskCreator, bytes32 _taskId) private {\n require(\n _createdTasks[_taskCreator].contains(_taskId),\n \"Automate.cancelTask: Task not found\"\n );\n\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/AutomateStorage.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {LibDataTypes} from \"./libraries/LibDataTypes.sol\";\n\n/**\n * @notice Storage layout of Automate smart contract.\n */\n// solhint-disable max-states-count\nabstract contract AutomateStorage {\n mapping(bytes32 => address) public taskCreator; ///@dev Deprecated\n mapping(bytes32 => address) public execAddresses; ///@dev Deprecated\n mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;\n\n uint256 public fee;\n address public feeToken;\n\n ///@dev Appended State\n mapping(bytes32 => LibDataTypes.Time) public timedTask; ///@dev Deprecated\n mapping(LibDataTypes.Module => address) public taskModuleAddresses;\n mapping(bytes32 => uint256) public nonce1Balance; ///@dev Deprecated\n}\n" + }, + "contracts/functions/FExec.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\nimport {GelatoBytes} from \"../vendor/gelato/GelatoBytes.sol\";\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\n\nfunction _call(\n address _add,\n bytes memory _data,\n uint256 _value,\n bool _revertOnFailure,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.call{value: _value}(_data);\n\n if (!success && _revertOnFailure)\n GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n\nfunction _delegateCall(\n address _add,\n bytes memory _data,\n string memory _tracingInfo\n) returns (bool success, bytes memory returnData) {\n (success, returnData) = _add.delegatecall(_data);\n\n if (!success) GelatoBytes.revertWithError(returnData, _tracingInfo);\n}\n" + }, + "contracts/functions/FUtils.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\naddress constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n// solhint-disable private-vars-leading-underscore\n// solhint-disable func-visibility\nfunction _transfer(\n address payable _to,\n address _paymentToken,\n uint256 _amount\n) {\n if (_paymentToken == ETH) {\n (bool success, ) = _to.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), _to, _amount);\n }\n}\n" + }, + "contracts/integrations/AutomateModuleHelper.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./Types.sol\";\n\nabstract contract AutomateModuleHelper {\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _eventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(TriggerType.EVENT, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/AutomateReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReady {\n IAutomate public immutable automate;\n address public immutable dedicatedMsgSender;\n address private immutable feeCollector;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n constructor(address _automate, address _taskCreator) {\n automate = IAutomate(_automate);\n IGelato gelato = IGelato(IAutomate(_automate).gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(_automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateReadyUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"./Types.sol\";\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract to\n * - Make synchronous fee payments.\n * - Have call restrictions for functions to be automated.\n */\n//solhint-disable func-name-mixedcase\n// solhint-disable private-vars-leading-underscore\nabstract contract AutomateReadyUpgradeable is Initializable {\n IAutomate public immutable automate;\n address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n address internal feeCollector;\n address public dedicatedMsgSender;\n\n /**\n * @dev\n * Only tasks created by _taskCreator defined in constructor can call\n * the functions with this modifier.\n */\n modifier onlyDedicatedMsgSender() {\n require(msg.sender == dedicatedMsgSender, \"Only dedicated msg.sender\");\n _;\n }\n\n constructor(address _automate) {\n automate = IAutomate(_automate);\n }\n\n /**\n * @dev\n * _taskCreator is the address which will create tasks for this contract.\n */\n function __AutomateReady_init(address _taskCreator)\n internal\n onlyInitializing\n {\n IGelato gelato = IGelato(automate.gelato());\n\n feeCollector = gelato.feeCollector();\n\n address proxyModuleAddress = IAutomate(automate).taskModuleAddresses(\n Module.PROXY\n );\n\n address opsProxyFactoryAddress = IProxyModule(proxyModuleAddress)\n .opsProxyFactory();\n\n (dedicatedMsgSender, ) = IOpsProxyFactory(opsProxyFactoryAddress)\n .getProxyOf(_taskCreator);\n }\n\n /**\n * @dev\n * Transfers fee to gelato for synchronous fee payments.\n *\n * _fee & _feeToken should be queried from IAutomate.getFeeDetails()\n */\n function _transfer(uint256 _fee, address _feeToken) internal {\n if (_feeToken == ETH) {\n (bool success, ) = feeCollector.call{value: _fee}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_feeToken), feeCollector, _fee);\n }\n }\n\n function _getFeeDetails()\n internal\n view\n returns (uint256 fee, address feeToken)\n {\n (fee, feeToken) = automate.getFeeDetails();\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./AutomateReady.sol\";\nimport {AutomateModuleHelper} from \"./AutomateModuleHelper.sol\";\n\n/**\n * @dev Inherit this contract to allow your smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreator is AutomateModuleHelper, AutomateReady {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReady(_automate, address(this)) {}\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n}\n" + }, + "contracts/integrations/AutomateTaskCreatorUpgradeable.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport \"./AutomateReadyUpgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @dev Inherit this contract to allow your upgradeable smart contract\n * to be a task creator and create tasks.\n */\n//solhint-disable func-name-mixedcase\n//solhint-disable const-name-snakecase\n//solhint-disable no-empty-blocks\nabstract contract AutomateTaskCreatorUpgradeable is AutomateReadyUpgradeable {\n using SafeERC20 for IERC20;\n\n IGelato1Balance public constant gelato1Balance =\n IGelato1Balance(0x7506C12a824d73D9b08564d5Afc22c949434755e);\n\n constructor(address _automate) AutomateReadyUpgradeable(_automate) {}\n\n function __AutomateTaskCreator_init() internal onlyInitializing {\n __AutomateReady_init(address(this));\n }\n\n function _depositFunds1Balance(\n uint256 _amount,\n address _token,\n address _sponsor\n ) internal {\n if (_token == ETH) {\n ///@dev Only deposit ETH on goerli for now.\n require(block.chainid == 5, \"Only deposit ETH on goerli\");\n gelato1Balance.depositNative{value: _amount}(_sponsor);\n } else {\n ///@dev Only deposit USDC on polygon for now.\n require(\n block.chainid == 137 &&\n _token ==\n address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174),\n \"Only deposit USDC on polygon\"\n );\n IERC20(_token).approve(address(gelato1Balance), _amount);\n gelato1Balance.depositToken(_sponsor, _token, _amount);\n }\n }\n\n function _createTask(\n address _execAddress,\n bytes memory _execDataOrSelector,\n ModuleData memory _moduleData,\n address _feeToken\n ) internal returns (bytes32) {\n return\n automate.createTask(\n _execAddress,\n _execDataOrSelector,\n _moduleData,\n _feeToken\n );\n }\n\n function _cancelTask(bytes32 _taskId) internal {\n automate.cancelTask(_taskId);\n }\n\n function _resolverModuleArg(\n address _resolverAddress,\n bytes memory _resolverData\n ) internal pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n\n function _proxyModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _singleExecModuleArg() internal pure returns (bytes memory) {\n return bytes(\"\");\n }\n\n function _web3FunctionModuleArg(\n string memory _web3FunctionHash,\n bytes memory _web3FunctionArgsHex\n ) internal pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n\n function _timeTriggerModuleArg(uint128 _start, uint128 _interval)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(TriggerType.TIME, triggerConfig);\n }\n\n function _cronTriggerModuleArg(string memory _expression)\n internal\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(TriggerType.CRON, triggerConfig);\n }\n\n function _blockTriggerModuleArg() internal pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(bytes(\"\"));\n\n return abi.encode(TriggerType.BLOCK, triggerConfig);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterResolverTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n ETH\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterSingleExecTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withoutTreasury/CounterTriggerTaskCreatorWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a trigger task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreatorWT is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address payable _automate) AutomateTaskCreator(_automate) {}\n\n receive() external payable {}\n\n function createTask() external payable {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(address(this), execData, moduleData, ETH);\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a resolver task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterResolverTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _resolverModuleArg(\n address(this),\n abi.encodeCall(this.checker, ())\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n abi.encode(this.increaseCount.selector),\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) >= INTERVAL;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a single exec task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterSingleExecTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.SINGLE_EXEC;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _singleExecModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n count += _amount;\n taskId = bytes32(\"\");\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterTriggerTaskCreator.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n/**\n * @dev\n * Example contract that creates a time task.\n */\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterTriggerTaskCreator is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint128 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask() external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.modules[1] = Module.PROXY;\n\n moduleData.args[0] = _timeTriggerModuleArg(\n uint128(block.timestamp),\n INTERVAL\n );\n moduleData.args[1] = _proxyModuleArg();\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n}\n" + }, + "contracts/integrations/examples/contractCreator/withTreasury/CounterWeb3Function.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport \"../../../AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\n//solhint-disable not-rely-on-time\ncontract CounterWeb3Function is AutomateTaskCreator {\n uint256 public count;\n uint256 public lastExecuted;\n bytes32 public taskId;\n uint256 public constant MAX_COUNT = 5;\n uint256 public constant INTERVAL = 3 minutes;\n\n event CounterTaskCreated(bytes32 taskId);\n\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function createTask(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external {\n require(taskId == bytes32(\"\"), \"Already started task\");\n\n bytes memory execData = abi.encodeCall(this.increaseCount, (1));\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](2),\n args: new bytes[](2)\n });\n moduleData.modules[0] = Module.PROXY;\n moduleData.modules[1] = Module.WEB3_FUNCTION;\n\n moduleData.args[0] = _proxyModuleArg();\n moduleData.args[1] = _web3FunctionModuleArg(\n _web3FunctionHash,\n _web3FunctionArgsHex\n );\n\n bytes32 id = _createTask(\n address(this),\n execData,\n moduleData,\n address(0)\n );\n\n taskId = id;\n emit CounterTaskCreated(id);\n }\n\n function cancelTask() external {\n require(taskId != bytes32(\"\"), \"Task not started\");\n _cancelTask(taskId);\n }\n\n function increaseCount(uint256 _amount) external onlyDedicatedMsgSender {\n uint256 newCount = count + _amount;\n\n if (newCount >= MAX_COUNT) {\n _cancelTask(taskId);\n count = 0;\n } else {\n count += _amount;\n lastExecuted = block.timestamp;\n }\n }\n\n function depositFunds(uint256 _amount, address _token) external payable {\n _depositFunds1Balance(_amount, _token, address(this));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterResolverWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolverWT {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withoutTreasury/CounterWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract CounterWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/Counter.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {AutomateReady} from \"../../../AutomateReady.sol\";\n\n// solhint-disable not-rely-on-time\n// solhint-disable no-empty-blocks\ncontract Counter is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n function increaseCount(uint256 amount) external onlyDedicatedMsgSender {\n count += amount;\n lastExecuted = block.timestamp;\n }\n}\n" + }, + "contracts/integrations/examples/userCreator/withTreasury/CounterResolver.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ninterface ICounter {\n function increaseCount(uint256 amount) external;\n\n function lastExecuted() external view returns (uint256);\n}\n\n// solhint-disable not-rely-on-time\ncontract CounterResolver {\n ICounter public immutable counter;\n\n constructor(ICounter _counter) {\n counter = _counter;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n uint256 lastExecuted = counter.lastExecuted();\n\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(ICounter.increaseCount, (1));\n }\n}\n" + }, + "contracts/integrations/Types.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nenum Module {\n RESOLVER,\n DEPRECATED_TIME,\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n}\n\nenum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n}\n\nstruct ModuleData {\n Module[] modules;\n bytes[] args;\n}\n\ninterface IAutomate {\n function createTask(\n address execAddress,\n bytes calldata execDataOrSelector,\n ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n function cancelTask(bytes32 taskId) external;\n\n function getFeeDetails() external view returns (uint256, address);\n\n function gelato() external view returns (address payable);\n\n function taskModuleAddresses(Module) external view returns (address);\n}\n\ninterface IProxyModule {\n function opsProxyFactory() external view returns (address);\n}\n\ninterface IOpsProxyFactory {\n function getProxyOf(address account) external view returns (address, bool);\n}\n\ninterface IGelato1Balance {\n function depositNative(address _sponsor) external payable;\n\n function depositToken(\n address _sponsor,\n address _token,\n uint256 _amount\n ) external;\n}\n\ninterface IGelato {\n function feeCollector() external view returns (address);\n}\n" + }, + "contracts/interfaces/IAutomate.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {IGelato1Balance} from \"./IGelato1Balance.sol\";\n\n// solhint-disable max-line-length\ninterface IAutomate is IGelato1Balance {\n /**\n * @notice Initiates a task with conditions which Gelato will monitor and execute when conditions are met.\n *\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n *\n * @return taskId Unique hash of the task created.\n */\n function createTask(\n address execAddress,\n bytes calldata execData,\n LibDataTypes.ModuleData calldata moduleData,\n address feeToken\n ) external returns (bytes32 taskId);\n\n /**\n * @notice Terminates a task that was created and Gelato can no longer execute it.\n *\n * @param taskId Unique hash of the task that is being cancelled. {See LibTaskId-getTaskId}\n */\n function cancelTask(bytes32 taskId) external;\n\n /**\n * @notice Execution API called by Gelato, using Sync Fee as fee payment method\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n uint256 txFee,\n address feeToken,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param oneBalanceParam Parameters required for fee payment with Gelato 1Balance.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n */\n function exec1Balance(\n address taskCreator,\n address execAddress,\n bytes memory execData,\n LibDataTypes.ModuleData calldata moduleData,\n Gelato1BalanceParam calldata oneBalanceParam,\n bool revertOnFailure\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato 1Balance as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModule(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n bytes32 correlationId,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Execution API called by Gelato, using Gelato Sync fee as fee payment method.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called by Gelato.\n * @param taskId Unique hash of the task.\n * @param txFee Fee paid to Gelato for execution, transfered to Gelato.feeCollector().\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param revertOnFailure To revert or not if call to execAddress fails. (Used for off-chain simulations)\n * @param singleExec If the task is a SingleExec task. If true, task will be cancelled after execution.\n */\n function execBypassModuleSyncFee(\n address taskCreator,\n address execAddress,\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bytes memory execData,\n bool revertOnFailure,\n bool singleExec\n ) external;\n\n /**\n * @notice Sets the address of task modules. Only callable by proxy admin.\n *\n * @param modules List of modules to be set\n * @param moduleAddresses List of addresses for respective modules.\n */\n function setModule(\n LibDataTypes.Module[] calldata modules,\n address[] calldata moduleAddresses\n ) external;\n\n /**\n * @notice Helper function to query fee and feeToken to be used for payment. (For executions which pays itself)\n *\n * @return uint256 Fee amount to be paid.\n * @return address Token to be paid. (Determined and passed by taskCreator during createTask)\n */\n function getFeeDetails() external view returns (uint256, address);\n\n /**\n * @notice Helper func to query all open tasks by a task creator.\n *\n * @param taskCreator Address of task creator to query.\n *\n * @return bytes32[] List of taskIds created.\n */\n function getTaskIdsByUser(address taskCreator)\n external\n view\n returns (bytes32[] memory);\n\n /**\n * @notice Helper function to compute task id with module arguments\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) external pure returns (bytes32 taskId);\n}\n" + }, + "contracts/interfaces/IERC20Extended.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Extended {\n function decimals() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender)\n external\n view\n returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n}\n" + }, + "contracts/interfaces/IGelato1Balance.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IGelato1Balance {\n struct Gelato1BalanceParam {\n address sponsor;\n address feeToken;\n uint256 oneBalanceChainId;\n uint256 nativeToFeeTokenXRateNumerator;\n uint256 nativeToFeeTokenXRateDenominator;\n bytes32 correlationId;\n }\n\n event LogUseGelato1Balance(\n address indexed sponsor,\n address indexed target,\n address indexed feeToken,\n uint256 oneBalanceChainId,\n uint256 nativeToFeeTokenXRateNumerator,\n uint256 nativeToFeeTokenXRateDenominator,\n bytes32 correlationId\n );\n}\n" + }, + "contracts/interfaces/IOpsProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxy {\n /**\n * @notice Emitted when proxy calls a contract successfully in `executeCall`\n *\n * @param target Address of contract that is called\n * @param data Data used in the call.\n * @param value Native token value used in the call.\n * @param returnData Data returned by the call.\n */\n event ExecuteCall(\n address indexed target,\n bytes data,\n uint256 value,\n bytes returnData\n );\n\n /**\n * @notice Multicall to different contracts with different datas.\n *\n * @param targets Addresses of contracts to be called.\n * @param datas Datas for each contract call.\n * @param values Native token value for each contract call.\n */\n function batchExecuteCall(\n address[] calldata targets,\n bytes[] calldata datas,\n uint256[] calldata values\n ) external payable;\n\n /**\n * @notice Call to a single contract.\n *\n * @param target Address of contracts to be called.\n * @param data Data for contract call.\n * @param value Native token value for contract call.\n */\n function executeCall(\n address target,\n bytes calldata data,\n uint256 value\n ) external payable;\n\n /**\n * @return address Ops smart contract address\n */\n function ops() external view returns (address);\n\n /**\n * @return address Owner of the proxy\n */\n function owner() external view returns (address);\n\n /**\n * @return uint256 version of OpsProxy.\n */\n function version() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IOpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.12;\n\ninterface IOpsProxyFactory {\n /**\n * @notice Emitted when an OpsProxy is deployed.\n *\n * @param deployer Address which initiated the deployment\n * @param owner The address which the proxy is for.\n * @param proxy Address of deployed proxy.\n */\n event DeployProxy(\n address indexed deployer,\n address indexed owner,\n address indexed proxy\n );\n\n /**\n * @notice Emitted when OpsProxy implementation to be deployed is changed.\n *\n * @param oldImplementation Previous OpsProxy implementation.\n * @param newImplementation Current OpsProxy implementation.\n */\n event SetImplementation(\n address indexed oldImplementation,\n address indexed newImplementation\n );\n\n /**\n * @notice Emitted when OpsProxy implementation is added or removed from whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelisted Added or removed from whitelist.\n */\n event UpdateWhitelistedImplementation(\n address indexed implementation,\n bool indexed whitelisted\n );\n\n /**\n * @notice Deploys OpsProxy for the msg.sender.\n *\n * @return proxy Address of deployed proxy.\n */\n function deploy() external returns (address payable proxy);\n\n /**\n * @notice Deploys OpsProxy for another address.\n *\n * @param owner Address to deploy the proxy for.\n *\n * @return proxy Address of deployed proxy.\n */\n function deployFor(address owner) external returns (address payable proxy);\n\n /**\n * @notice Sets the OpsProxy implementation that will be deployed by OpsProxyFactory.\n *\n * @param newImplementation New implementation to be set.\n */\n function setImplementation(address newImplementation) external;\n\n /**\n * @notice Add or remove OpsProxy implementation from the whitelist.\n *\n * @param implementation OpsProxy implementation.\n * @param whitelist Added or removed from whitelist.\n */\n function updateWhitelistedImplementations(\n address implementation,\n bool whitelist\n ) external;\n\n /**\n * @notice Determines the OpsProxy address when it is not deployed.\n *\n * @param account Address to determine the proxy address for.\n */\n function determineProxyAddress(address account)\n external\n view\n returns (address);\n\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n\n /**\n * @return address Owner of deployed proxy.\n */\n function ownerOf(address proxy) external view returns (address);\n\n /**\n * @return bool Whether if implementation is whitelisted.\n */\n function whitelistedImplementations(address implementation)\n external\n view\n returns (bool);\n}\n" + }, + "contracts/interfaces/IResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @notice Standard interface that should be used when creating a resolver.\n *\n * NOTE `checker` can be non view as well as it will be\n * called with static call off chain\n */\ninterface IResolver {\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload);\n}\n" + }, + "contracts/interfaces/ITaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\ninterface ITaskModule {\n /**\n * @notice Called before generating taskId.\n * @dev Modules can override execAddress or taskCreator. {See ProxyModule-preCreateTask}\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n *\n * @return address Overriden or original taskCreator.\n * @return address Overriden or original execAddress.\n */\n function preCreateTask(address taskCreator, address execAddress)\n external\n returns (address, address);\n\n /**\n * @notice Initiates task module whenever `createTask` is being called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n * @param initModuleArg Encoded arguments for module if any.\n */\n function onCreateTask(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData,\n bytes calldata initModuleArg\n ) external;\n\n /**\n * @notice Called before taskId is removed from _createdTasks[].\n * @dev Modules can override taskCreator.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n *\n * @return address Overriden or original taskCreator.\n */\n function preCancelTask(bytes32 taskId, address taskCreator)\n external\n returns (address);\n\n /**\n * @notice Called during `exec` and before execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n *\n * @return address Overriden or original execution address.\n * @return bytes Overriden or original execution data.\n */\n function preExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external returns (address, bytes memory);\n\n /**\n * @notice Called during `exec` and after execAddress is called.\n *\n * @param taskId Unique hash of the task created.\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that should be called.\n * @param execData Execution data to be called with / function selector if execution data is yet to be determined.\n */\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external;\n}\n" + }, + "contracts/libraries/LibBypassModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibEvents} from \"./LibEvents.sol\";\nimport {LibTaskModule} from \"./LibTaskModule.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Simplified library for task executions\nlibrary LibBypassModule {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls SingleExecModule on exec for single exec tasks.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param _singleExec If task is a single exec task.\n * @param _createdTasks The storage reference of owner to the taskIds created mapping.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n bool _revertOnFailure,\n bool _singleExec,\n mapping(address => EnumerableSet.Bytes32Set) storage _createdTasks\n ) internal returns (bool callSuccess) {\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n if (_singleExec) {\n _createdTasks[_taskCreator].remove(_taskId);\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n }\n}\n" + }, + "contracts/libraries/LibDataTypes.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\n// solhint-disable max-line-length\nlibrary LibDataTypes {\n /**\n * @notice Whitelisted modules that are available for users to customise conditions and specifications of their tasks.\n *\n * @param RESOLVER Use dynamic condition & input data for execution. {See ResolverModule.sol}\n * @param DEPRECATED_TIME deprecated\n * @param PROXY Creates a dedicated caller (msg.sender) to be used when executing the task. {See ProxyModule.sol}\n * @param SINGLE_EXEC Task is cancelled after one execution. {See SingleExecModule.sol}\n * @param WEB3_FUNCTION Use off-chain condition & input data for execution. {See Web3FunctionModule.sol}\n * @param TRIGGER Repeated execution of task ata a specified timing and interval or cron. {See TriggerModule.sol}\n */\n enum Module {\n RESOLVER,\n DEPRECATED_TIME, // @deprecated\n PROXY,\n SINGLE_EXEC,\n WEB3_FUNCTION,\n TRIGGER\n }\n\n /**\n * @notice Struct to contain modules and their relative arguments that are used for task creation.\n *\n * @param modules List of selected modules.\n * @param args Arguments of modules if any. Pass \"0x\" for modules which does not require args {See encodeModuleArg}\n */\n struct ModuleData {\n Module[] modules;\n bytes[] args;\n }\n\n /**\n * @notice Struct for time module.\n *\n * @param nextExec Time when the next execution should occur.\n * @param interval Time interval between each execution.\n */\n struct Time {\n uint128 nextExec;\n uint128 interval;\n }\n\n /**\n * @notice Types of trigger\n *\n * @param TIME Time triggered tasks, starting at a specific time and triggered intervally\n * @param CRON Cron triggered tasks, triggered according to the cron conditions\n */\n enum TriggerType {\n TIME,\n CRON,\n EVENT,\n BLOCK\n }\n\n /**\n * @notice Struct for trigger module\n *\n * @param triggerType Type of the trigger\n * @param triggerConfig Trigger configuration that shuold be parsed according to triggerType\n */\n struct TriggerModuleData {\n TriggerType triggerType;\n bytes triggerConfig;\n }\n}\n" + }, + "contracts/libraries/LibEvents.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\nlibrary LibEvents {\n /**\n * @notice Emitted when `createTask` is called.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that is called by Gelato.\n * @param execDataOrSelector Execution data / function selector.\n * @param moduleData Conditional modules used. {See LibDataTypes-ModuleData}\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n */\n event TaskCreated(\n address indexed taskCreator,\n address indexed execAddress,\n bytes execDataOrSelector,\n LibDataTypes.ModuleData moduleData,\n address feeToken,\n bytes32 indexed taskId\n );\n\n /**\n * @notice Emitted when `cancelTask` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param taskCreator The address which owned the task.\n */\n event TaskCancelled(bytes32 taskId, address taskCreator);\n\n /**\n * @notice Emitted when `exec` is called.\n *\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execData Execution data / function selector.\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecSuccess(\n uint256 indexed txFee,\n address indexed feeToken,\n address indexed execAddress,\n bytes execData,\n bytes32 taskId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModule` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param correlationId Id of the execution to be used for 1Balance settlement.\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSuccess(\n bytes32 taskId,\n bytes32 correlationId,\n bool callSuccess\n );\n\n /**\n * @notice Emitted when `execBypassModuleSyncFee` is called.\n *\n * @param taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param txFee Fee paid to Gelato for execution\n * @param feeToken Token used to pay for the execution. ETH = 0xeeeeee...\n * @param callSuccess Status of the call to execAddress.\n */\n event ExecBypassModuleSyncFeeSuccess(\n bytes32 taskId,\n uint256 txFee,\n address feeToken,\n bool callSuccess\n );\n}\n" + }, + "contracts/libraries/LibTaskId.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to compute taskId of tasks.\n */\n// solhint-disable max-line-length\nlibrary LibTaskId {\n /**\n * @notice Returns taskId of taskCreator.\n *\n * @param taskCreator The address which created the task.\n * @param execAddress Address of contract that will be called by Gelato.\n * @param execSelector Signature of the function which will be called by Gelato.\n * @param moduleData Conditional modules that will be used. {See LibDataTypes-ModuleData}\n * @param feeToken Address of token to be used as payment. Use address(0) if Gelato 1Balance is being used, 0xeeeeee... for ETH or native tokens.\n */\n function getTaskId(\n address taskCreator,\n address execAddress,\n bytes4 execSelector,\n LibDataTypes.ModuleData memory moduleData,\n address feeToken\n ) internal pure returns (bytes32 taskId) {\n taskId = keccak256(\n abi.encode(\n taskCreator,\n execAddress,\n execSelector,\n moduleData,\n feeToken\n )\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModule.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {_call, _delegateCall} from \"../functions/FExec.sol\";\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\nimport {LibTaskModuleConfig} from \"./LibTaskModuleConfig.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable function-max-lines\n/// @notice Library to call task modules on task creation and execution.\nlibrary LibTaskModule {\n using LibTaskModuleConfig for LibDataTypes.Module;\n\n /**\n * @notice Delegate calls task modules before generating taskId.\n *\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCreateTask(\n address _taskCreator,\n address _execAddress,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address, address) {\n uint256 length = uint256(type(LibDataTypes.Module).max) + 1;\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n if (!module.requirePreCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCreateTask.selector,\n _taskCreator,\n _execAddress\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCreateTask: \"\n );\n\n (_taskCreator, _execAddress) = abi.decode(\n returnData,\n (address, address)\n );\n }\n\n return (_taskCreator, _execAddress);\n }\n\n /**\n * @notice Delegate calls task modules on create task to initialise them.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _moduleData Modules that will be used for the task. {See LibDataTypes-ModuleData}\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onCreateTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.ModuleData memory _moduleData,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal {\n uint256 length = _moduleData.modules.length;\n\n _validModules(_moduleData.modules);\n\n for (uint256 i; i < length; i++) {\n LibDataTypes.Module module = _moduleData.modules[i];\n if (!module.requireOnCreate()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.onCreateTask.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _moduleData.args[i]\n );\n\n _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.onCreateTask: \"\n );\n }\n }\n\n /**\n * @notice Delegate calls task modules before removing task.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator The address which created the task.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function preCancelTask(\n bytes32 _taskId,\n address _taskCreator,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (address) {\n uint256 length = uint256(type(LibDataTypes.Module).max);\n\n for (uint256 i; i <= length; i++) {\n LibDataTypes.Module module = LibDataTypes.Module(i);\n\n if (!module.requirePreCancel()) continue;\n\n address moduleAddress = taskModuleAddresses[module];\n _moduleInitialised(moduleAddress);\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preCancelTask.selector,\n _taskId,\n _taskCreator\n );\n\n (, bytes memory returnData) = _delegateCall(\n moduleAddress,\n delegatecallData,\n \"Automate.preCancelTask: \"\n );\n\n (_taskCreator) = abi.decode(returnData, (address));\n }\n\n return _taskCreator;\n }\n\n /**\n * @notice Delegate calls task modules on exec.\n *\n * @param _taskId Unique hash of the task. {See LibTaskId-getTaskId}\n * @param _taskCreator Address which created the task.\n * @param _execAddress Address of contract that will be called by Gelato.\n * @param _execData Execution data to be called with / function selector.\n * @param _modules Modules that is used for the task. {See LibDataTypes-Module}\n * @param _revertOnFailure To revert or not if call to execAddress fails.\n * @param taskModuleAddresses The storage reference to the mapping of modules to their address.\n */\n function onExecTask(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n bool _revertOnFailure,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) internal returns (bool callSuccess) {\n address[] memory moduleAddresses = _getModuleAddresses(\n _modules,\n taskModuleAddresses\n );\n\n (_execAddress, _execData) = preExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n\n (callSuccess, ) = _call(\n _execAddress,\n abi.encodePacked(_execData, _taskCreator),\n 0,\n _revertOnFailure,\n \"Automate.exec: \"\n );\n\n postExecCall(\n _taskId,\n _taskCreator,\n _execAddress,\n _execData,\n _modules,\n moduleAddresses\n );\n }\n\n function preExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal returns (address, bytes memory) {\n uint256 length = _modules.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePreExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.preExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n (, bytes memory returnData) = _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.preExecCall: \"\n );\n\n (_execAddress, _execData) = abi.decode(\n returnData,\n (address, bytes)\n );\n }\n return (_execAddress, _execData);\n }\n\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address _execAddress,\n bytes memory _execData,\n LibDataTypes.Module[] memory _modules,\n address[] memory _moduleAddresses\n ) internal {\n uint256 length = _moduleAddresses.length;\n\n for (uint256 i; i < length; i++) {\n if (!_modules[i].requirePostExec()) continue;\n\n bytes memory delegatecallData = abi.encodeWithSelector(\n ITaskModule.postExecCall.selector,\n _taskId,\n _taskCreator,\n _execAddress,\n _execData\n );\n\n _delegateCall(\n _moduleAddresses[i],\n delegatecallData,\n \"Automate.postExecCall: \"\n );\n }\n }\n\n function _getModuleAddresses(\n LibDataTypes.Module[] memory _modules,\n mapping(LibDataTypes.Module => address) storage taskModuleAddresses\n ) private view returns (address[] memory) {\n uint256 length = _modules.length;\n address[] memory moduleAddresses = new address[](length);\n\n for (uint256 i; i < length; i++) {\n moduleAddresses[i] = taskModuleAddresses[_modules[i]];\n }\n\n return moduleAddresses;\n }\n\n function _moduleInitialised(address _moduleAddress) private pure {\n require(\n _moduleAddress != address(0),\n \"Automate._moduleInitialised: Not init\"\n );\n }\n\n /**\n * @dev\n * - No duplicate modules\n * - No deprecated TIME\n * - No RESOLVER && WEB3_FUNCTION\n * - PROXY is required\n */\n function _validModules(LibDataTypes.Module[] memory _modules) private pure {\n uint256 length = _modules.length;\n\n uint256 existsLength = uint256(type(LibDataTypes.Module).max) + 1;\n bool[] memory exists = new bool[](existsLength);\n\n for (uint256 i = 0; i < length; i++) {\n if (i > 0) {\n require(\n _modules[i] > _modules[i - 1],\n \"Automate._validModules: Asc only\"\n );\n }\n\n exists[uint256(_modules[i])] = true;\n }\n\n require(\n !exists[uint256(LibDataTypes.Module.DEPRECATED_TIME)],\n \"Automate._validModules: TIME is deprecated\"\n );\n\n require(\n !(exists[uint256(LibDataTypes.Module.RESOLVER)] &&\n exists[uint256(LibDataTypes.Module.WEB3_FUNCTION)]),\n \"Automate._validModules: Only RESOLVER or WEB3_FUNCTION\"\n );\n\n require(\n exists[uint256(LibDataTypes.Module.PROXY)],\n \"Automate._validModules: PROXY is required\"\n );\n }\n}\n" + }, + "contracts/libraries/LibTaskModuleConfig.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.12;\n\nimport {LibDataTypes} from \"./LibDataTypes.sol\";\n\n/**\n * @notice Library to determine wether to call task modules to reduce unnecessary calls.\n */\nlibrary LibTaskModuleConfig {\n function requirePreCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreCancel(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requireOnCreate(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePreExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.PROXY) return true;\n\n return false;\n }\n\n function requirePostExec(LibDataTypes.Module _module)\n internal\n pure\n returns (bool)\n {\n if (_module == LibDataTypes.Module.SINGLE_EXEC) return true;\n\n return false;\n }\n}\n" + }, + "contracts/opsProxy/OpsProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {_call} from \"../functions/FExec.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\n\ncontract OpsProxy is Proxied, IOpsProxy {\n // solhint-disable const-name-snakecase\n uint256 public constant override version = 1;\n address public immutable override ops;\n\n modifier onlyAuth() {\n address proxyOwner = owner();\n if (msg.sender != proxyOwner) {\n require(msg.sender == ops, \"OpsProxy: Not authorised\");\n require(\n _getTaskCreator() == proxyOwner,\n \"OpsProxy: Only tasks created by owner\"\n );\n } // else msg.sender == proxyOwner\n _;\n }\n\n // solhint-disable no-empty-blocks\n constructor(address _ops) {\n ops = _ops;\n }\n\n receive() external payable {}\n\n ///@inheritdoc IOpsProxy\n function batchExecuteCall(\n address[] calldata _targets,\n bytes[] calldata _datas,\n uint256[] calldata _values\n ) external payable override onlyAuth {\n uint256 length = _targets.length;\n require(\n length == _datas.length && length == _values.length,\n \"OpsProxy: Length mismatch\"\n );\n\n for (uint256 i; i < length; i++)\n _executeCall(_targets[i], _datas[i], _values[i]);\n }\n\n ///@inheritdoc IOpsProxy\n function executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) external payable override onlyAuth {\n _executeCall(_target, _data, _value);\n }\n\n function owner() public view returns (address) {\n return _proxyAdmin();\n }\n\n function _executeCall(\n address _target,\n bytes calldata _data,\n uint256 _value\n ) private {\n (, bytes memory returnData) = _call(\n _target,\n _data,\n _value,\n true,\n \"OpsProxy.executeCall: \"\n );\n\n emit ExecuteCall(_target, _data, _value, returnData);\n }\n\n function _getTaskCreator() private pure returns (address taskCreator) {\n assembly {\n taskCreator := shr(96, calldataload(sub(calldatasize(), 20)))\n }\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactory.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactory is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops) {\n ops = _ops;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n address proxyAddress = _proxyOf[_account];\n if (proxyAddress != address(0)) return proxyAddress;\n\n bytes memory bytecode = _getBytecode(_account);\n\n bytes32 codeHash = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n bytes32(0),\n keccak256(bytecode)\n )\n );\n\n return address(uint160(uint256(codeHash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n abi.encode(address(this), implementation, _owner, bytes(\"\"))\n );\n }\n}\n" + }, + "contracts/opsProxy/OpsProxyFactoryZkSync.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n Initializable\n} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {EIP173OpsProxy} from \"../vendor/proxy/EIP173/EIP173OpsProxy.sol\";\nimport {Proxied} from \"../vendor/proxy/EIP173/Proxied.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\n// solhint-disable max-states-count\ncontract OpsProxyFactoryZkSync is Initializable, Proxied, IOpsProxyFactory {\n address public immutable ops;\n bytes32 public immutable eip173OpsProxyByteCodeHash;\n\n address public implementation;\n mapping(address => bool) public override whitelistedImplementations;\n\n ///@dev track proxy of user\n mapping(address => address) internal _proxyOf;\n\n ///@dev track owner of proxy\n mapping(address => address) internal _ownerOf;\n\n modifier onlyOneProxy(address _account) {\n require(_proxyOf[_account] == address(0), \"OpsProxyFactory: One proxy\");\n _;\n }\n\n modifier notProxy(address _account) {\n require(_ownerOf[_account] == address(0), \"OpsProxyFactory: No proxy\");\n _;\n }\n\n constructor(address _ops, bytes32 _eip173OpsProxyByteCodeHash) {\n ops = _ops;\n eip173OpsProxyByteCodeHash = _eip173OpsProxyByteCodeHash;\n }\n\n function initialize(address _implementation) external initializer {\n implementation = _implementation;\n whitelistedImplementations[_implementation] = true;\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deploy() external override returns (address payable proxy) {\n proxy = deployFor(msg.sender);\n }\n\n function setImplementation(address _newImplementation)\n external\n onlyProxyAdmin\n {\n address oldImplementation = implementation;\n require(\n oldImplementation != _newImplementation &&\n whitelistedImplementations[_newImplementation],\n \"OpsProxyFactory: Invalid implementation\"\n );\n\n implementation = _newImplementation;\n\n emit SetImplementation(oldImplementation, _newImplementation);\n }\n\n function updateWhitelistedImplementations(\n address _implementation,\n bool _whitelist\n ) external onlyProxyAdmin {\n whitelistedImplementations[_implementation] = _whitelist;\n\n emit UpdateWhitelistedImplementation(_implementation, _whitelist);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function getProxyOf(address _account)\n external\n view\n override\n returns (address, bool)\n {\n address proxyAddress = _proxyOf[_account];\n\n if (proxyAddress != address(0)) return (proxyAddress, true);\n\n proxyAddress = determineProxyAddress(_account);\n return (proxyAddress, false);\n }\n\n ///@inheritdoc IOpsProxyFactory\n function ownerOf(address _proxy) external view override returns (address) {\n return _ownerOf[_proxy];\n }\n\n ///@inheritdoc IOpsProxyFactory\n function deployFor(address owner)\n public\n override\n onlyOneProxy(owner)\n notProxy(owner)\n returns (address payable proxy)\n {\n proxy = _deploy(bytes32(0), _getBytecode(owner));\n\n _proxyOf[owner] = proxy;\n _ownerOf[proxy] = owner;\n\n emit DeployProxy(msg.sender, owner, address(proxy));\n }\n\n ///@inheritdoc IOpsProxyFactory\n function determineProxyAddress(address _account)\n public\n view\n override\n returns (address)\n {\n bytes32 constructorInputHash = keccak256(\n _encodeConstructorInput(_account)\n );\n\n bytes32 create2Hash = keccak256(\n bytes.concat(\n keccak256(\"zksyncCreate2\"),\n bytes32(uint256(uint160(address(this)))),\n bytes32(0),\n eip173OpsProxyByteCodeHash,\n constructorInputHash\n )\n );\n\n return address(uint160(uint256(create2Hash)));\n }\n\n function _deploy(bytes32 _salt, bytes memory _bytecode)\n internal\n returns (address payable proxy)\n {\n assembly {\n let endowment := 0\n let bytecodeStart := add(_bytecode, 0x20)\n let bytecodeLength := mload(_bytecode)\n proxy := create2(endowment, bytecodeStart, bytecodeLength, _salt)\n }\n }\n\n function _getBytecode(address _owner) internal view returns (bytes memory) {\n return\n abi.encodePacked(\n type(EIP173OpsProxy).creationCode,\n _encodeConstructorInput(_owner)\n );\n }\n\n function _encodeConstructorInput(address _account)\n internal\n view\n returns (bytes memory)\n {\n return abi.encode(address(this), implementation, _account, bytes(\"\"));\n }\n}\n" + }, + "contracts/taskModules/ProxyModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {IOpsProxy} from \"../interfaces/IOpsProxy.sol\";\nimport {IOpsProxyFactory} from \"../interfaces/IOpsProxyFactory.sol\";\n\ncontract ProxyModule is TaskModuleBase {\n IOpsProxyFactory public immutable opsProxyFactory;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n */\n function onCreateTask(\n bytes32,\n address _taskCreator,\n address,\n bytes calldata,\n bytes calldata\n ) external override {\n _deployIfNoProxy(_taskCreator);\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _taskCreator cannot create task to other user's proxy\n */\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n view\n override\n returns (address, address)\n {\n address ownerOfExecAddress = opsProxyFactory.ownerOf(_execAddress);\n\n if (ownerOfExecAddress != address(0)) {\n // creating task to proxy\n require(\n _taskCreator == ownerOfExecAddress ||\n _taskCreator == _execAddress,\n \"ProxyModule: Only owner of proxy\"\n );\n\n return (ownerOfExecAddress, _execAddress);\n } else {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n // creating task to non proxy, with proxy\n // give task ownership to proxy owner\n return (ownerOfTaskCreator, _execAddress);\n }\n\n // creating task to non proxy, without proxy\n return (_taskCreator, _execAddress);\n }\n }\n\n function preCancelTask(bytes32, address _taskCreator)\n external\n view\n override\n returns (address)\n {\n address ownerOfTaskCreator = opsProxyFactory.ownerOf(_taskCreator);\n\n if (ownerOfTaskCreator != address(0)) {\n return ownerOfTaskCreator;\n }\n\n return _taskCreator;\n }\n\n /**\n * @inheritdoc TaskModuleBase\n * @dev _execData is encoded with proxy's `executeCall` function\n * unless _execAddress is OpsProxy which assumes that _execData is encoded\n * with `executeCall` or `batchExecuteCall`.\n */\n function preExecCall(\n bytes32,\n address _taskCreator,\n address _execAddress,\n bytes calldata _execData\n ) external view override returns (address, bytes memory execData) {\n (address proxy, ) = opsProxyFactory.getProxyOf(_taskCreator);\n\n execData = _execAddress == proxy\n ? _execData\n : _encodeWithOpsProxy(_execAddress, _execData);\n\n _execAddress = proxy;\n\n return (_execAddress, execData);\n }\n\n function _deployIfNoProxy(address _taskCreator) private {\n bool isTaskCreatorProxy = opsProxyFactory.ownerOf(_taskCreator) !=\n address(0);\n\n if (!isTaskCreatorProxy) {\n (, bool deployed) = opsProxyFactory.getProxyOf(_taskCreator);\n if (!deployed) opsProxyFactory.deployFor(_taskCreator);\n }\n }\n\n function _encodeWithOpsProxy(address _execAddress, bytes calldata _execData)\n private\n pure\n returns (bytes memory)\n {\n return\n abi.encodeWithSelector(\n IOpsProxy.executeCall.selector,\n _execAddress,\n _execData,\n 0\n );\n }\n}\n" + }, + "contracts/taskModules/ResolverModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\n\ncontract ResolverModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for ResolverModule.\n *\n * @param _resolverAddress Address of resolver.\n * @param _resolverData Data passed to resolver.\n */\n function encodeModuleArg(\n address _resolverAddress,\n bytes calldata _resolverData\n ) external pure returns (bytes memory) {\n return abi.encode(_resolverAddress, _resolverData);\n }\n}\n" + }, + "contracts/taskModules/SingleExecModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n EnumerableSet\n} from \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibEvents} from \"../libraries/LibEvents.sol\";\n\ncontract SingleExecModule is TaskModuleBase {\n using EnumerableSet for EnumerableSet.Bytes32Set;\n\n /// @inheritdoc TaskModuleBase\n function postExecCall(\n bytes32 _taskId,\n address _taskCreator,\n address,\n bytes calldata\n ) external override {\n _createdTasks[_taskCreator].remove(_taskId);\n\n emit LibEvents.TaskCancelled(_taskId, _taskCreator);\n }\n}\n" + }, + "contracts/taskModules/TaskModuleBase.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {AutomateStorage} from \"../AutomateStorage.sol\";\nimport {ITaskModule} from \"../interfaces/ITaskModule.sol\";\n\n// solhint-disable no-empty-blocks\nabstract contract TaskModuleBase is AutomateStorage, ITaskModule {\n ///@inheritdoc ITaskModule\n function preCreateTask(address _taskCreator, address _execAddress)\n external\n virtual\n override\n returns (address, address)\n {\n return (_taskCreator, _execAddress);\n }\n\n ///@inheritdoc ITaskModule\n function onCreateTask(\n bytes32,\n address,\n address,\n bytes calldata,\n bytes calldata\n ) external virtual override {}\n\n ///@inheritdoc ITaskModule\n function preCancelTask(bytes32, address _taskCreator)\n external\n virtual\n override\n returns (address)\n {\n return _taskCreator;\n }\n\n ///@inheritdoc ITaskModule\n function preExecCall(\n bytes32,\n address,\n address _execAddress,\n bytes calldata _execData\n ) external virtual override returns (address, bytes memory) {\n return (_execAddress, _execData);\n }\n\n ///@inheritdoc ITaskModule\n function postExecCall(\n bytes32 taskId,\n address taskCreator,\n address execAddress,\n bytes calldata execData\n ) external virtual override {}\n}\n" + }, + "contracts/taskModules/TriggerModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\n\n// solhint-disable not-rely-on-time\ncontract TriggerModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for TriggerModule for Timer.\n *\n * @param _start Time when the first execution should occur.\n * @param _interval Time interval between each execution.\n */\n function encodeTimeTriggerModuleArg(uint128 _start, uint128 _interval)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_start, _interval);\n\n return abi.encode(LibDataTypes.TriggerType.TIME, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Cron.\n *\n * @param _expression Cron expression\n */\n function encodeCronTriggerModuleArg(string calldata _expression)\n external\n pure\n returns (bytes memory)\n {\n bytes memory triggerConfig = abi.encode(_expression);\n\n return abi.encode(LibDataTypes.TriggerType.CRON, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Event.\n *\n * @param _address Address to listen to for events.\n * @param _topics Set of topics to filter at each topic position.\n * @param _blockConfirmations Number of blocks to wait for before triggering.\n */\n function encodeEventTriggerModuleArg(\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) external pure returns (bytes memory) {\n bytes memory triggerConfig = abi.encode(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return abi.encode(LibDataTypes.TriggerType.EVENT, triggerConfig);\n }\n\n /**\n * @notice Helper function to encode arguments for TriggerModule for Block.\n */\n function encodeBlockTriggerModuleArg()\n external\n pure\n returns (bytes memory)\n {\n return abi.encode(LibDataTypes.TriggerType.BLOCK);\n }\n}\n" + }, + "contracts/taskModules/Web3FunctionModule.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {TaskModuleBase} from \"./TaskModuleBase.sol\";\nimport {LibDataTypes} from \"../libraries/LibDataTypes.sol\";\nimport {_call} from \"../functions/FExec.sol\";\n\ncontract Web3FunctionModule is TaskModuleBase {\n /**\n * @notice Helper function to encode arguments for Web3FunctionModule.\n *\n * @param _web3FunctionHash IPFS hash of web3 function.\n * @param _web3FunctionArgsHex Arguments to be passed into web3 function in hex.\n */\n function encodeModuleArg(\n string memory _web3FunctionHash,\n bytes calldata _web3FunctionArgsHex\n ) external pure returns (bytes memory) {\n return abi.encode(_web3FunctionHash, _web3FunctionArgsHex);\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreator.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorTest is AutomateTaskCreator {\n constructor(address _automate) AutomateTaskCreator(_automate) {}\n\n function resolverModuleData() external pure returns (ModuleData memory) {\n (\n address resolverAddress,\n bytes memory resolverData\n ) = resolverModuleArgs();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.RESOLVER;\n moduleData.args[0] = _resolverModuleArg(resolverAddress, resolverData);\n\n return moduleData;\n }\n\n function proxyModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.PROXY;\n moduleData.args[0] = _proxyModuleArg();\n\n return moduleData;\n }\n\n function singleExecModuleData() external pure returns (ModuleData memory) {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.SINGLE_EXEC;\n moduleData.args[0] = _singleExecModuleArg();\n\n return moduleData;\n }\n\n function web3FunctionModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n string memory web3FunctionHash,\n string memory currency,\n string memory oracleAddress\n ) = web3FunctionArg();\n\n bytes memory web3FunctionArgsHex = abi.encode(currency, oracleAddress);\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.WEB3_FUNCTION;\n moduleData.args[0] = _web3FunctionModuleArg(\n web3FunctionHash,\n web3FunctionArgsHex\n );\n\n return moduleData;\n }\n\n function timeTriggerModuleData() external pure returns (ModuleData memory) {\n (uint128 startTime, uint128 interval) = timeTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _timeTriggerModuleArg(startTime, interval);\n\n return moduleData;\n }\n\n function cronTriggerModuleData() external pure returns (ModuleData memory) {\n string memory cronExpressionArg = cronTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _cronTriggerModuleArg(cronExpressionArg);\n\n return moduleData;\n }\n\n function eventTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n (\n address _address,\n bytes32[][] memory _topics,\n uint256 _blockConfirmations\n ) = eventTriggerArg();\n\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _eventTriggerModuleArg(\n _address,\n _topics,\n _blockConfirmations\n );\n\n return moduleData;\n }\n\n function blockTriggerModuleData()\n external\n pure\n returns (ModuleData memory)\n {\n ModuleData memory moduleData = ModuleData({\n modules: new Module[](1),\n args: new bytes[](1)\n });\n\n moduleData.modules[0] = Module.TRIGGER;\n moduleData.args[0] = _blockTriggerModuleArg();\n\n return moduleData;\n }\n\n function resolverModuleArgs() public pure returns (address, bytes memory) {\n return (0x1d810c54fa36a9Af4c9f547328CBe91f41444c19, \"0xcf5303cf\");\n }\n\n function web3FunctionArg()\n public\n pure\n returns (\n string memory,\n string memory,\n string memory\n )\n {\n return (\n \"QmQdwLX9HkCqD4Hop18tuj3aH211uadPDdP6YX6nvbkbqY\",\n \"ethereum\",\n \"0x71B9B0F6C999CBbB0FeF9c92B80D54e4973214da\"\n );\n }\n\n function timeTriggerArg() public pure returns (uint128, uint128) {\n return (1694000, 300000);\n }\n\n function cronTriggerArg() public pure returns (string memory) {\n return \"*/5 * * * *\";\n }\n\n function eventTriggerArg()\n public\n pure\n returns (\n address,\n bytes32[][] memory,\n uint256\n )\n {\n // [[A],[],[B,C],[]]\n bytes32[][] memory topics = new bytes32[][](4);\n //[A]\n topics[0] = new bytes32[](1);\n topics[0][0] = keccak256(\"A\");\n\n //[B,C]\n topics[2] = new bytes32[](2);\n topics[2][0] = keccak256(\"B\");\n topics[2][1] = keccak256(\"C\");\n\n return (\n address(0x1d810c54fa36a9Af4c9f547328CBe91f41444c19),\n topics,\n 100\n );\n }\n}\n" + }, + "contracts/tests/AutomateTaskCreatorUpgradeableTest .sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateTaskCreatorUpgradeable.sol\";\n\n//solhint-disable no-empty-blocks\ncontract AutomateTaskCreatorUpgradeableTest is AutomateTaskCreatorUpgradeable {\n constructor(address _automate) AutomateTaskCreatorUpgradeable(_automate) {}\n\n function initialize() external initializer {\n __AutomateTaskCreator_init();\n }\n\n function getFeeCollector() external view returns (address) {\n return feeCollector;\n }\n}\n" + }, + "contracts/tests/CounterTest.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CounterTest {\n address public automate;\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address payable _automate) {\n automate = _automate;\n }\n\n // solhint-disable not-rely-on-time\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function increaseCountReverts(uint256 amount) external {\n require(false, \"Counter: reverts\");\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n\n function checkerReverts()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCountReverts, (1));\n }\n}\n" + }, + "contracts/tests/CounterTestWT.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport \"../integrations/AutomateReady.sol\";\n\n// solhint-disable no-empty-blocks\n// solhint-disable not-rely-on-time\ncontract CounterTestWT is AutomateReady {\n uint256 public count;\n uint256 public lastExecuted;\n\n constructor(address _automate, address _taskCreator)\n AutomateReady(_automate, _taskCreator)\n {}\n\n receive() external payable {}\n\n function increaseCount(uint256 amount) external {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n\n (uint256 fee, address feeToken) = _getFeeDetails();\n\n _transfer(fee, feeToken);\n }\n\n function checker()\n external\n view\n returns (bool canExec, bytes memory execPayload)\n {\n canExec = (block.timestamp - lastExecuted) > 180;\n\n execPayload = abi.encodeCall(this.increaseCount, (1));\n }\n}\n" + }, + "contracts/tests/CounterWL.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// solhint-disable not-rely-on-time\ncontract CounterWL is Ownable {\n uint256 public count;\n uint256 public lastExecuted;\n mapping(address => bool) public whitelisted;\n\n modifier onlyWhitelisted() {\n require(\n whitelisted[msg.sender] || msg.sender == owner(),\n \"Counter: Not whitelisted\"\n );\n _;\n }\n\n function increaseCount(uint256 amount) external onlyWhitelisted {\n require(\n ((block.timestamp - lastExecuted) > 180),\n \"Counter: increaseCount: Time not elapsed\"\n );\n\n count += amount;\n lastExecuted = block.timestamp;\n }\n\n function setWhitelist(address _account, bool _whitelist)\n external\n onlyOwner\n {\n whitelisted[_account] = _whitelist;\n }\n}\n" + }, + "contracts/vendor/gelato/GelatoBytes.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nlibrary GelatoBytes {\n function calldataSliceSelector(bytes calldata _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function memorySliceSelector(bytes memory _bytes)\n internal\n pure\n returns (bytes4 selector)\n {\n selector =\n _bytes[0] |\n (bytes4(_bytes[1]) >> 8) |\n (bytes4(_bytes[2]) >> 16) |\n (bytes4(_bytes[3]) >> 24);\n }\n\n function revertWithError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n revert(string(abi.encodePacked(_tracingInfo, string(_bytes))));\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"))\n );\n }\n } else {\n revert(\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"))\n );\n }\n }\n\n function returnError(bytes memory _bytes, string memory _tracingInfo)\n internal\n pure\n returns (string memory)\n {\n // 68: 32-location, 32-length, 4-ErrorSelector, UTF-8 err\n if (_bytes.length % 32 == 4) {\n bytes4 selector;\n assembly {\n selector := mload(add(0x20, _bytes))\n }\n if (selector == 0x08c379a0) {\n // Function selector for Error(string)\n assembly {\n _bytes := add(_bytes, 68)\n }\n return string(abi.encodePacked(_tracingInfo, string(_bytes)));\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"NoErrorSelector\"));\n }\n } else {\n return\n string(abi.encodePacked(_tracingInfo, \"UnexpectedReturndata\"));\n }\n }\n}\n" + }, + "contracts/vendor/gelato/Gelatofied.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {_transfer, ETH} from \"../../functions/FUtils.sol\";\n\nabstract contract Gelatofied {\n address payable public immutable gelato;\n\n modifier gelatofy(uint256 _amount, address _paymentToken) {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n _transfer(gelato, _paymentToken, _amount);\n }\n\n modifier onlyGelato() {\n require(msg.sender == gelato, \"Gelatofied: Only gelato\");\n _;\n }\n\n constructor(address payable _gelato) {\n gelato = _gelato;\n }\n}\n" + }, + "contracts/vendor/gelato/OpsReady.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.12;\n\nimport {\n SafeERC20,\n IERC20\n} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ninterface IAutomate {\n function gelato() external view returns (address payable);\n}\n\nabstract contract AutomateReady {\n address public immutable automate;\n address payable public immutable gelato;\n address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\n\n modifier onlyAutomate() {\n require(msg.sender == automate, \"AutomateReady: onlyAutomate\");\n _;\n }\n\n constructor(address _automate) {\n automate = _automate;\n gelato = IAutomate(_automate).gelato();\n }\n\n function _transfer(uint256 _amount, address _paymentToken) internal {\n if (_paymentToken == ETH) {\n (bool success, ) = gelato.call{value: _amount}(\"\");\n require(success, \"_transfer: ETH transfer failed\");\n } else {\n SafeERC20.safeTransfer(IERC20(_paymentToken), gelato, _amount);\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173OpsProxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\nimport {IOpsProxyFactory} from \"../../../interfaces/IOpsProxyFactory.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n/**\n * @notice Proxy implementing EIP173 for ownership management.\n * @notice This is used for OpsProxy.\n *\n * @dev 1. custom receive can be set in implementation.\n * @dev 2. transferProxyAdmin removed.\n * @dev 3. implementation can only be set to those whitelisted on OpsProxyFactory.\n */\ncontract EIP173OpsProxy is Proxy {\n // ////////////////////////// STATES ///////////////////////////////////////////////////////////////////////\n IOpsProxyFactory public immutable opsProxyFactory;\n\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// MODIFIERS //////////////////////////////////////////////////////////////////////\n modifier onlyWhitelistedImplementation(address _implementation) {\n require(\n opsProxyFactory.whitelistedImplementations(_implementation),\n \"Implementation not whitelisted\"\n );\n _;\n }\n\n // /////////////////////// FALLBACKS //////////////////////////////////////////////////////////////////////\n receive() external payable override {\n _fallback();\n }\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address _opsProxyFactory,\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n opsProxyFactory = IOpsProxyFactory(_opsProxyFactory);\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function upgradeTo(address newImplementation)\n external\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n onlyWhitelistedImplementation(newImplementation)\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/EIP173Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nimport \"./Proxy.sol\";\n\ninterface ERC165 {\n function supportsInterface(bytes4 id) external view returns (bool);\n}\n\n///@notice Proxy implementing EIP173 for ownership management\ncontract EIP173Proxy is Proxy {\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\n\n event ProxyAdminTransferred(\n address indexed previousAdmin,\n address indexed newAdmin\n );\n\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\n\n constructor(\n address implementationAddress,\n address adminAddress,\n bytes memory data\n ) payable {\n _setImplementation(implementationAddress, data);\n _setProxyAdmin(adminAddress);\n }\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n function proxyAdmin() external view returns (address) {\n return _proxyAdmin();\n }\n\n function supportsInterface(bytes4 id) external view returns (bool) {\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\n return true;\n }\n if (id == 0xFFFFFFFF) {\n return false;\n }\n\n ERC165 implementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n implementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\n // In practise this is unlikely to be an issue.\n try implementation.supportsInterface(id) returns (bool support) {\n return support;\n } catch {\n return false;\n }\n }\n\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\n _setProxyAdmin(newAdmin);\n }\n\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\n _setImplementation(newImplementation, \"\");\n }\n\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n onlyProxyAdmin\n {\n _setImplementation(newImplementation, data);\n }\n\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n\n function _setProxyAdmin(address newAdmin) internal {\n address previousAdmin = _proxyAdmin();\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n newAdmin\n )\n }\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxied.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\nabstract contract Proxied {\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\n /// It also allows these functions to be called inside a contructor\n /// even if the contract is meant to be used without proxy\n modifier proxied() {\n address proxyAdminAddress = _proxyAdmin();\n // With hardhat-deploy proxies\n // the proxyAdminAddress is zero only for the implementation contract\n // if the implementation contract want to be used as a standalone/immutable contract\n // it simply has to execute the `proxied` function\n // This ensure the proxyAdminAddress is never zero post deployment\n // And allow you to keep the same code for both proxied contract and immutable contract\n if (proxyAdminAddress == address(0)) {\n // ensure can not be called twice when used outside of proxy : no admin\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n )\n }\n } else {\n require(msg.sender == proxyAdminAddress);\n }\n _;\n }\n\n modifier onlyProxyAdmin() {\n require(msg.sender == _proxyAdmin(), \"NOT_AUTHORIZED\");\n _;\n }\n\n function _proxyAdmin() internal view returns (address adminAddress) {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n adminAddress := sload(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\n )\n }\n }\n}\n" + }, + "contracts/vendor/proxy/EIP173/Proxy.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.12;\n\n// EIP-1967\nabstract contract Proxy {\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\n\n event ProxyImplementationUpdated(\n address indexed previousImplementation,\n address indexed newImplementation\n );\n\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\n\n // prettier-ignore\n receive() external payable virtual {\n revert(\"ETHER_REJECTED\"); // explicit reject by default\n }\n\n fallback() external payable {\n _fallback();\n }\n\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\n\n function _fallback() internal {\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n let implementationAddress := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n calldatacopy(0x0, 0x0, calldatasize())\n let success := delegatecall(\n gas(),\n implementationAddress,\n 0x0,\n calldatasize(),\n 0,\n 0\n )\n let retSz := returndatasize()\n returndatacopy(0, 0, retSz)\n switch success\n case 0 {\n revert(0, retSz)\n }\n default {\n return(0, retSz)\n }\n }\n }\n\n function _setImplementation(address newImplementation, bytes memory data)\n internal\n {\n address previousImplementation;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n previousImplementation := sload(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\n )\n }\n\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\n newImplementation\n )\n }\n\n emit ProxyImplementationUpdated(\n previousImplementation,\n newImplementation\n );\n\n if (data.length > 0) {\n (bool success, ) = newImplementation.delegatecall(data);\n if (!success) {\n assembly {\n // This assembly ensure the revert contains the exact string data\n let returnDataSize := returndatasize()\n returndatacopy(0, 0, returnDataSize)\n revert(0, returnDataSize)\n }\n }\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file